1 #ifndef PARSER_BITS_CLASS
2 #define PARSER_BITS_CLASS
53 bool leave_unknown =
true);
76 static bool is_eol(
char to_check);
96 static bool is_alpha(
const char *look_at,
int len);
106 static bool is_numeric(
const char *look_at,
int len);
Provides a dynamically resizable ASCII character string.
Warehouses some functions that are often useful during text parsing.
static void translate_CR_for_platform(basis::astring &to_translate)
flips embedded EOL characters for this platform's needs.
static bool is_identifier(char look_at)
returns true if "look_at" is a valid identifier character.
static bool is_hexadecimal(char look_at)
returns true if "look_at" is one of the hexadecimal characters.
static bool white_space_no_cr(char to_check)
reports if "to_check" is white space but not a carriage return.
static bool white_space(char to_check)
returns true if the character "to_check" is considered a white space.
static bool is_alpha(char look_at)
returns true if "look_at" is one of the alphabetical characters.
static bool is_printable_ascii(char to_check)
returns true if "to_check" is a normally visible ASCII character.
line_ending
Line endings is an enumeration of the separator character(s) used for text files.
@ LF_AT_END
Unix standard is LF_AT_END ("\n").
@ CRLF_AT_END
DOS standard is CRLF_AT_END ("\r\n").
@ NO_ENDING
No additional characters added as line endings.
static basis::astring substitute_env_vars(const basis::astring &text, bool leave_unknown=true)
resolves embedded environment variables in "text".
static bool is_alphanumeric(char look_at)
returns true if "look_at" is one of the alphanumeric characters.
static line_ending platform_eol()
provides the appropriate ending on the current OS platform.
static bool is_numeric(char look_at)
returns true if "look_at" is a valid numerical character.
static const char * eol_to_chars(line_ending ending)
returns the C string form for the "ending" value.
static bool is_eol(char to_check)
returns true if "to_check" is part of an end-of-line sequence.
static const char * platform_eol_to_chars()
provides the characters that make up this platform's line ending.