Layers 2.0 is archived. The latest version is 3.0. Read the 3.0 docs

lstring.h Header

#include <Layers/lstring.h>

Type Aliases

using LString Type alias for std::string used throughout the Layers framework.
using LStringList Type alias for a vector of strings.

Functions

bool starts_with(const LString & str, const LString & prefix)
LString remove_substring(LString str, const std::string & sub)

Type Alias Documentation

using LString = std::string

Type alias for std::string used throughout the Layers framework.

using LStringList = std::vector<std::string>

Type alias for a vector of strings.

Function Documentation

bool starts_with(const LString & str, const LString & prefix)

Checks if a string starts with the given prefix.

Returns true if str begins with prefix, false otherwise.

LString remove_substring(LString str, const std::string & sub)

Removes the first occurrence of a substring from a string.

Returns a new string with the first occurrence of sub removed. If sub is not found, returns a copy of the original string.

Appearance
Theme
—