ADTF
3.18.2
|
Public API for string modification and inspection functions. More...
Go to the source code of this file.
Namespaces | |
a_util | |
Serves as the root component, with common functionality documented in core functionality. | |
a_util::strings | |
Serves as component for string handling and conversion functionality. | |
Functions | |
int | compare (const char *left, const char *right) |
Compares two 0-terminated C-strings. More... | |
int | compare (const char *left, const char *right, std::size_t pos) |
Compares two 0-terminated C-strings. More... | |
int | compare (const char *left, const char *right, std::size_t pos, std::size_t length) |
Compares two 0-terminated C-strings. More... | |
int | compareNoCase (const char *left, const char *right) |
Compares two 0-terminated C-strings, ignoring the case using _tcsicmp. More... | |
int | compareNoCase (const char *left, const char *right, std::size_t pos) |
Compares two 0-terminated C-strings, ignoring the case using _tcsicmp. More... | |
int | compareNoCase (const char *left, const char *right, std::size_t pos, std::size_t length) |
Compares two 0-terminated C-strings, ignoring the case using _tcsicmp. More... | |
bool | isEqual (const char *left, const char *right) |
Compares two 0-terminated C-strings for equality. More... | |
bool | isEqual (const char *left, const char *right, std::size_t pos) |
Compares two 0-terminated C-strings for equality. More... | |
bool | isEqual (const char *left, const char *right, std::size_t pos, std::size_t length) |
Compares two 0-terminated C-strings for equality. More... | |
bool | isEqualNoCase (const char *left, const char *right) |
Compares two 0-terminated C-strings for equality ignoring their case. More... | |
bool | isEqualNoCase (const char *left, const char *right, std::size_t pos) |
Compares two 0-terminated C-strings for equality ignoring their case. More... | |
bool | isEqualNoCase (const char *left, const char *right, std::size_t pos, std::size_t length) |
Compares two 0-terminated C-strings for equality ignoring their case. More... | |
std::size_t | getLength (const char *str) |
Counts the number of characters in a 0-terminated C-string. More... | |
std::size_t | copy (char *dest, std::size_t dest_size, const char *source) |
Copies up to dest_size-1 characters from source to dest, ensuring null termination. More... | |
std::size_t | copy (char *dest, std::size_t dest_size, const char *source, std::size_t count) |
Copies up to count characters from source to dest, ensuring null termination. More... | |
std::vector< std::string > | split (const std::string &str, const std::string &separator) |
Splits a string using a specified separator string. More... | |
std::vector< std::string > | split (const std::string &str, const std::string &separator, bool keep_empty) |
Splits a string using a specified separator string. More... | |
std::vector< std::string > | splitToken (const std::string &str) |
Splits a string on whitespace characters. More... | |
std::vector< std::string > | splitToken (const std::string &str, const std::string &separators) |
Splits a string using a set of separator characters. More... | |
std::vector< std::string > | splitToken (const std::string &str, const std::string &separators, bool keep_empty) |
Splits a string using a set of separator characters. More... | |
std::string & | trim (std::string &str) |
Trims all whitespace characters from the start and end of a string. More... | |
std::string & | trim (std::string &str, const std::string &trimmed_chars) |
Trims a specified set of characters from the start and end of a string. More... | |
bool | isEmpty (const char *str) |
Checks whether a C-style string is empty, meaning nullptr or "". More... | |
bool | isNotEmpty (const char *str) |
Checks whether a C-style string is not empty, meaning neither nullptr nor "". More... | |
std::string & | replace (std::string &str, const std::string &subject, const std::string &replacement) |
In-place replacement of all occurences of subject with replacement . More... | |
std::string | replace (const std::string &str, const std::string &subject, const std::string &replacement) |
Replace all occurences of subject with replacement . More... | |
std::string | join (const std::vector< std::string > &strings, const std::string &delimiter) |
Joins all strings from the vector into one string, separated by the specified delimiter string. More... | |
Variables | |
const std::string | white_space |
Contains all whitespaces (" \t\n\r") | |
const std::string | empty_string |
Contains the empty string. | |
Public API for string modification and inspection functions.
Copyright @ 2023 VW Group. All rights reserved. This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.
Definition in file strings_functions.h.