226 int8_t minLength3= -1, int8_t minLength4= -1, int8_t minLength5= -1,
227 int8_t minLength6= -1, int8_t minLength7= -1 );
240 {
Define( definitionSrc, separator ); }
277 "Error {} in definition of token \"{}\". Use DbgGetError() in debug-compilations!",
309 "Error {} in definition of token \"{}\". Use DbgGetError() in debug-compilations!",
341 ALIB_ASSERT_ERROR( idx >= 0 && idx <= 6 ,
"STRINGS/TOK",
"Index {} out of range.", idx )
343 return (idx >= 0 && idx <= 6) ?
minLengths[idx] : -1;
406namespace alib {
namespace strings {
408namespace APPENDABLES {
@ ErrorReadingSensitivity
Sensitivity value not found.
@ TooManyMinLengthsGiven
A maximum of 7 minimum length values was exceeded.
@ EmptyName
No token name found.
@ ZeroMinLengthAndNotLastCamelHump
@ ErrorReadingMinLengths
Error parsing the list of minimum lengths.
@ DefinitionStringNotConsumed
The definition string was not completely consumed.
@ MinLenExceedsSegmentLength
ALIB_DLL void detectFormat()
Detects snake_case, kebab-case or CamelCase.
int8_t GetMinLength(int idx) const
String definitionName
The tokens' definition string part.
Token(const String &definitionSrc, character separator=';')
DbgDefinitionError DbgGetError()
const String & GetDefinitionName() const
lang::Case Sensitivity() const
Formats
Format types detected with detectFormat.
@ CamelCase
UpperCamelCase or lowerCamelCase.
@ SnakeCase
snake_case using underscores.
@ Normal
Normal, optionally abbreviated words.
@ KebabCase
kebab-case using hyphens.
Token()
Parameterless constructor. Creates an "undefined" token.
Formats format
Defines the "case type" as well as the letter case sensitivity of this token.
String exportName
The tokens' optional explicit export name.
static constexpr Formats ignoreCase
Letter case sensitivity. This is combined with the format bits.
Formats GetFormat() const
ALIB_DLL void Define(const String &definition, character separator=';')
ALIB_DLL bool Match(const String &needle)
ALIB_DLL void GetExportName(AString &target) const
#define ALIB_ENUMS_MAKE_BITWISE(TEnum)
#define ALIB_ASSERT_ERROR(cond, domain,...)
#define ALIB_REL_DBG(releaseCode,...)
Case
Denotes upper and lower case character treatment.
constexpr String NULL_STRING
A nulled string of the default character type.
strings::util::Token Token
Type alias in namespace alib.
strings::TAString< character, lang::HeapAllocator > AString
Type alias in namespace alib.
strings::TString< character > String
Type alias in namespace alib.
characters::character character
Type alias in namespace alib.
void operator()(strings::TAString< character, TAllocator > &target, const strings::util::Token &src)