PCL
|
Generic base class of character traits classes. More...
#include <CharTraits.h>
Public Types | |
using | char_type = T |
Static Public Member Functions | |
static constexpr char_type | Blank () noexcept |
static constexpr size_type | BytesPerChar () noexcept |
static constexpr char_type | Colon () noexcept |
static constexpr char_type | Comma () noexcept |
static int | Compare (const char_type *__restrict__ s1, size_type n1, const char_type *__restrict__ s2, size_type n2, bool caseSensitive=true, bool localeAware=true) noexcept |
static int | CompareCodePoints (const char_type *__restrict__ s1, size_type n1, const char_type *__restrict__ s2, size_type n2, bool caseSensitive=true) noexcept |
static void | Copy (char_type *__restrict__ dst, const char_type *__restrict__ src, size_type n) noexcept |
static void | CopyOverlapped (char_type *dst, const char_type *src, size_type n) noexcept |
static constexpr char_type | CR () noexcept |
static constexpr char_type | DecimalSeparator () noexcept |
static constexpr char_type | DoubleQuote () noexcept |
static constexpr char_type | ExponentDelimiter () noexcept |
static void | Fill (char_type *__restrict__ s, char_type c, size_type n) noexcept |
static constexpr char_type | Hyphen () noexcept |
static constexpr bool | IsAlpha (char_type c) noexcept |
static constexpr bool | IsDecimalSeparator (char_type c) noexcept |
static constexpr bool | IsDigit (char_type c) noexcept |
static constexpr bool | IsExponentDelimiter (char_type c) noexcept |
static constexpr bool | IsHexDigit (char_type c) noexcept |
static constexpr bool | IsLowercaseAlpha (char_type c) noexcept |
static constexpr bool | IsNull (char_type c) noexcept |
static constexpr bool | IsSign (char_type c) noexcept |
static constexpr bool | IsSpace (char_type c) noexcept |
static constexpr bool | IsStartingSymbolDigit (char_type c) noexcept |
static constexpr bool | IsSymbolDigit (char_type c) noexcept |
static constexpr bool | IsTrimable (char_type c) noexcept |
static constexpr bool | IsUnderscore (char_type c) noexcept |
static constexpr bool | IsUppercaseAlpha (char_type c) noexcept |
static constexpr bool | IsWildcard (char_type c) noexcept |
static size_type | Length (const char_type *s) noexcept |
static constexpr char_type | LF () noexcept |
static constexpr char_type | MinusSign () noexcept |
static constexpr char_type | Null () noexcept |
static constexpr char_type | PlusSign () noexcept |
template<typename Ptr1 , typename Ptr2 > | |
static Ptr1 | SearchTrimLeft (Ptr1 i, Ptr2 j) noexcept |
template<typename Ptr1 , typename Ptr2 > | |
static Ptr2 | SearchTrimRight (Ptr1 i, Ptr2 j) noexcept |
static constexpr char_type | Semicolon () noexcept |
static constexpr char_type | SingleQuote () noexcept |
static constexpr char_type | Tab () noexcept |
static char_type | ToCaseFolded (char_type c) noexcept |
static void | ToLowercase (char_type *__restrict__ s, size_type n) noexcept |
static constexpr char_type | ToLowercase (char_type c) noexcept |
static void | ToUppercase (char_type *__restrict__ s, size_type n) noexcept |
static constexpr char_type | ToUppercase (char_type c) noexcept |
static constexpr char_type | Underscore () noexcept |
static bool | WildMatch (const char_type *__restrict__ t, size_type nt, const char_type *__restrict__ p, size_type np, bool caseSensitive=true) noexcept |
GenericCharTraits defines fundamental properties and functionality common to all character types.
The purpose of a character traits class is to characterize a data type to represent a single element of a string, or character. For example, a char traits class must provide primitive routines to copy, compare and classify characters and sequences of characters.
GenericCharTraits is a template class that must be instantiated for suitable data types. Two instantiations of GenericCharTraits, namely for char
and char16_type
, originate the IsoString and String fundamental PCL classes, respectively. The versatile interface provided by GenericCharTraits makes it possible to implement string classes virtually for any data type with default and copy constructor semantics.
Definition at line 315 of file CharTraits.h.
using pcl::GenericCharTraits< T >::char_type = T |
Represents the character data type used by this traits class.
Definition at line 322 of file CharTraits.h.
|
inlinestaticconstexprnoexcept |
Returns the blank space character (white space).
Definition at line 575 of file CharTraits.h.
|
inlinestaticconstexprnoexcept |
Number of bytes per character.
Definition at line 327 of file CharTraits.h.
|
inlinestaticconstexprnoexcept |
Returns the colon punctuator character ':'.
Definition at line 615 of file CharTraits.h.
|
inlinestaticconstexprnoexcept |
Returns the comma punctuator character ','.
Definition at line 607 of file CharTraits.h.
|
inlinestaticnoexcept |
Lexicographical comparison between two generic strings.
s1 | First string. |
n1 | Length of the first string in characters. |
s2 | Second string. |
n2 | Length of the second string in characters. |
caseSensitive | When true, a case-sensitive comparison is performed; otherwise the comparison does not distinguish between lowercase and uppercase characters. The default value of this parameter is true. |
localeAware | This parameter is ignored by GenericCharTraits. For locale-aware string comparisons, see the reimplementations of this static function in the IsoCharTraits and CharTraits template class instantiations. |
Returns an integer code representing the comparison result:
This default implementation simply calls CompareCodePoints() to compare the numerical values of string characters, so it cannot be localized and can't be aware of user locale settings. For more comprehensive, locale-aware Unicode implementations of this static function, see the IsoCharTraits and CharTraits classes.
Definition at line 456 of file CharTraits.h.
|
inlinestaticnoexcept |
Compares numeric character values between two strings.
s1 | First string. |
n1 | Length of the first string in characters. |
s2 | Second string. |
n2 | Length of the second string in characters. |
caseSensitive | When true, a case-sensitive comparison is performed; otherwise the comparison does not distinguish between lowercase and uppercase characters. The default value of this parameter is true. |
Returns an integer code representing the comparison result:
This function compares the numerical values of string characters. For case-insensitive comparisons, this generic routine is only valid for the ISO/IEC 8859-1 character set: characters in the ranges 0x41-0x5A, 0xC0-0xD6 and 0xD8-0xDE are considered identical to its counterparts in the ranges 0x61-0x7A, 0xE0-0xF6 and 0xF8-0xFE, respectively.
Definition at line 418 of file CharTraits.h.
|
inlinestaticnoexcept |
Copies a contiguous sequence of characters to a specified location. The source and destination regions do not overlap.
dst | Destination location where characters will be copied. |
src | Initial address of the sequence of source characters. |
n | Number of characters to copy. |
If the source and destination regions overlap, this routine will produce an unpredictable result. CopyOverlapped() should be used in these cases.
Definition at line 372 of file CharTraits.h.
|
inlinestaticnoexcept |
Copies a contiguous sequence of characters to a specified location. The source and destination regions may safely overlap.
dst | Destination location where characters will be copied. |
src | Initial address of the sequence of source characters. |
n | Number of characters to copy. |
Definition at line 386 of file CharTraits.h.
|
inlinestaticconstexprnoexcept |
Returns the carriage return control character '\r'.
Definition at line 591 of file CharTraits.h.
|
inlinestaticconstexprnoexcept |
Returns the decimal separator character '.'.
Definition at line 655 of file CharTraits.h.
|
inlinestaticconstexprnoexcept |
Returns the double quote character '"'.
Definition at line 687 of file CharTraits.h.
|
inlinestaticconstexprnoexcept |
Returns the exponent delimiter character 'e'.
Definition at line 663 of file CharTraits.h.
|
inlinestaticnoexcept |
Fills a contiguous region of characters with a constant value.
s | Initial address of a character sequence. |
c | Constant value to fill with. |
n | Number of characters to fill. |
Definition at line 354 of file CharTraits.h.
|
inlinestaticconstexprnoexcept |
Returns the hyphen punctuator character '-'.
Definition at line 631 of file CharTraits.h.
|
inlinestaticconstexprnoexcept |
Returns true iff a character c is in the range [a-zA-Z].
Definition at line 739 of file CharTraits.h.
|
inlinestaticconstexprnoexcept |
Returns true iff a character c is the decimal separator '.'.
Definition at line 797 of file CharTraits.h.
|
inlinestaticconstexprnoexcept |
Returns true iff a character c is a decimal digit. Decimal digits are in the range [0-9].
Definition at line 721 of file CharTraits.h.
|
inlinestaticconstexprnoexcept |
Returns true iff a character c is an exponent delimiter. Exponent delimiters are in the range [eEdD]. The [dD] pair allows for FORTRAN compatibility.
Definition at line 807 of file CharTraits.h.
|
inlinestaticconstexprnoexcept |
Returns true iff a character c is an hexadecimal digit. Hexadecimal digits are in the range [a-fA-F].
Definition at line 730 of file CharTraits.h.
|
inlinestaticconstexprnoexcept |
Returns true iff a character c is in the range [a-z].
Definition at line 747 of file CharTraits.h.
|
inlinestaticconstexprnoexcept |
Returns true iff a character c is a null string terminator.
Definition at line 695 of file CharTraits.h.
|
inlinestaticconstexprnoexcept |
Returns true iff a character c is a numerical sign, either '+' or '-'.
Definition at line 789 of file CharTraits.h.
|
inlinestaticconstexprnoexcept |
Returns true iff a character c is a white space character.
Definition at line 703 of file CharTraits.h.
|
inlinestaticconstexprnoexcept |
Returns true iff a character c is a valid starting symbol digit. A starting symbol digit is in the range [a-zA-Z_].
Definition at line 781 of file CharTraits.h.
|
inlinestaticconstexprnoexcept |
Returns true iff a character c is a valid symbol element. Symbol digits are in the range [a-zA-Z0-9_].
Definition at line 772 of file CharTraits.h.
|
inlinestaticconstexprnoexcept |
Returns true iff a character c is a trimable character. Generally equivalent to IsSpace().
Definition at line 712 of file CharTraits.h.
|
inlinestaticconstexprnoexcept |
Returns true iff a character c is the underscore character '_'.
Definition at line 763 of file CharTraits.h.
|
inlinestaticconstexprnoexcept |
Returns true iff a character c is in the range [A-Z].
Definition at line 755 of file CharTraits.h.
|
inlinestaticconstexprnoexcept |
Returns true iff a character c is a wildcard. The wildcards are the asterisk '*' and question mark '?' characters.
Definition at line 816 of file CharTraits.h.
|
inlinestaticnoexcept |
Returns the length of a null-terminated string in characters (not bytes).
The returned value is the length of the initial contiguous sequence of characters that are not equal to Null().
Definition at line 339 of file CharTraits.h.
|
inlinestaticconstexprnoexcept |
Returns the line feed control character '\n'.
Definition at line 599 of file CharTraits.h.
|
inlinestaticconstexprnoexcept |
Returns the minus sign character '-'.
Definition at line 647 of file CharTraits.h.
|
inlinestaticconstexprnoexcept |
Returns the null string termination character '\0'.
Definition at line 567 of file CharTraits.h.
|
inlinestaticconstexprnoexcept |
Returns the plus sign character '+'.
Definition at line 639 of file CharTraits.h.
|
inlinestaticnoexcept |
Returns a pointer to the first non-trimmable character in the sequence of contiguous characters defined by the range [i,j) of pointers.
Definition at line 826 of file CharTraits.h.
|
inlinestaticnoexcept |
Returns a pointer to the character after the last non-trimmable character in the sequence of contiguous characters defined by the range [i,j) of pointers.
If there are no trimmable characters in the specified sequence, this function returns the ending pointer j.
Definition at line 841 of file CharTraits.h.
|
inlinestaticconstexprnoexcept |
Returns the semicolon punctuator character ';'.
Definition at line 623 of file CharTraits.h.
|
inlinestaticconstexprnoexcept |
Returns the single quote character "'".
Definition at line 679 of file CharTraits.h.
|
inlinestaticconstexprnoexcept |
Returns the horizontal tab control character '\t'.
Definition at line 583 of file CharTraits.h.
|
inlinestaticnoexcept |
Returns the case folded equivalent character for the specified code point c.
Case folding elimitates case differences, which is useful for case-insensitive string comparisons.
This default implementation is only valid for the ISO/IEC-8859-1 character set. For a comprehensive Unicode implementation see the CharTraits class.
Definition at line 503 of file CharTraits.h.
|
inlinestaticnoexcept |
Transforms a string to lower case.
This default implementation is only valid for the ISO/IEC-8859-1 character set. For a comprehensive Unicode implementation see the CharTraits class.
Definition at line 543 of file CharTraits.h.
|
inlinestaticconstexprnoexcept |
Returns the lowercase equivalent character for the specified code point.
This default implementation is only valid for the ISO/IEC-8859-1 character set. For a comprehensive Unicode implementation see the CharTraits class.
Definition at line 515 of file CharTraits.h.
|
inlinestaticnoexcept |
Transforms a string to upper case.
This default implementation is only valid for the ISO/IEC-8859-1 character set. For a comprehensive Unicode implementation see the CharTraits class.
Definition at line 557 of file CharTraits.h.
|
inlinestaticconstexprnoexcept |
Returns the uppercase equivalent character for the specified code point.
This default implementation is only valid for the ISO/IEC-8859-1 character set. For a comprehensive Unicode implementation see the CharTraits class.
Definition at line 529 of file CharTraits.h.
|
inlinestaticconstexprnoexcept |
Returns the underscore character '_'.
Definition at line 671 of file CharTraits.h.
|
inlinestaticnoexcept |
Wildcard string matching algorithm.
t | The string to be matched. |
nt | Length of the string to be matched in characters. |
p | The pattern string. May contain multiple instances of the wildcard characters '*' and '?'. |
np | Length of the pattern string in characters. |
caseSensitive | When true, a case-sensitive comparison is performed; otherwise the comparison does not distinguish between lowercase and uppercase characters. The default value of this parameter is true. |
Returns true iff the string t matches the specified pattern p. If one of the strings is empty, this function always returns false conventionally, even if the pattern is a single asterisk '*'.
Definition at line 484 of file CharTraits.h.