|
cpp-strings 1.0.4
Pythonic c++ strings
|
Classes | |
| class | CppStringT |
| This is the templated base class for all CppString classes. More... | |
| class | Slice |
| Base class for slices, with start, stop and step specified values. More... | |
| struct | StartSlice |
| Base class for slices, with start, stop and step specified values. More... | |
| struct | StartStepSlice |
| struct of slices with default step values More... | |
| struct | StartStopSlice |
| struct of slices with default start and stop values More... | |
| struct | StepSlice |
| struct of slices with default start and step values More... | |
| struct | StopSlice |
| struct of slices with default stop and step values More... | |
| struct | StopStepSlice |
| struct of slices with default stop values More... | |
Typedefs | |
| using | CppString = CppStringT<char> |
| Specialization of basic class with template argument 'char'. | |
| using | CppWString = CppStringT<wchar_t> |
| Specialization of basic class with template argument 'wchar_t'. | |
Functions | |
| template<class CharT> | |
| const bool | is_alpha (const CharT ch) noexcept |
| struct of slices with default start values | |
| template<> | |
| const bool | is_alpha< char > (const char ch) noexcept |
| Returns true if character ch is alphabetic, or false otherwise. Conforms to the current locale settings. | |
| template<> | |
| const bool | is_alpha< wchar_t > (const wchar_t ch) noexcept |
| Returns true if character ch is alphabetic, or false otherwise. Conforms to the current locale settings. | |
| template<class CharT> | |
| const bool | is_ascii (const CharT ch) noexcept |
| Returns true if character ch gets ASCII code, or false otherwise. | |
| template<class CharT> | |
| const bool | is_decimal (const CharT ch) noexcept |
| Returns true if character is a decimal digit, or false otherwise. | |
| template<> | |
| const bool | is_decimal< char > (const char ch) noexcept |
| Returns true if character is a decimal digit, or false otherwise. | |
| template<> | |
| const bool | is_decimal< wchar_t > (const wchar_t ch) noexcept |
| Returns true if character is a decimal digit, or false otherwise. | |
| template<class CharT> | |
| const bool | is_digit (const CharT ch) noexcept |
| Returns true if character is a decimal digit, or false otherwise. | |
| template<> | |
| const bool | is_digit< char > (const char ch) noexcept |
| Returns true if character is a decimal digit, or false otherwise. | |
| template<> | |
| const bool | is_digit< wchar_t > (const wchar_t ch) noexcept |
| Returns true if character is a decimal digit, or false otherwise. | |
| template<class CharT> | |
| const bool | is_id_continue (const CharT ch) noexcept |
| Returns true if character is a continuing char for identifiers, or false otherwise. | |
| template<class CharT> | |
| const bool | is_id_start (const CharT ch) noexcept |
| Returns true if character is a starting char for identifiers, or false otherwise. | |
| template<class CharT> | |
| const bool | is_lower (const CharT ch) noexcept |
| Returns true if character is lowercase, or false otherwise. | |
| template<> | |
| const bool | is_lower< char > (const char ch) noexcept |
| Returns true if character ch is lowercase, or false otherwise. Conforms to the current locale settings. | |
| template<> | |
| const bool | is_lower< wchar_t > (const wchar_t ch) noexcept |
| Returns true if character ch is lowercase, or false otherwise. Conforms to the current locale settings. | |
| template<class CharT> | |
| const bool | is_numeric (const CharT ch) noexcept |
| Returns true if character is a decimal digit, or false otherwise. | |
| template<> | |
| const bool | is_numeric< char > (const char ch) noexcept |
| Returns true if character is a decimal digit, or false otherwise. | |
| template<> | |
| const bool | is_numeric< wchar_t > (const wchar_t ch) noexcept |
| Returns true if character is a decimal digit, or false otherwise. | |
| template<class CharT> | |
| const bool | is_printable (const CharT ch) noexcept |
| Returns true if character ch is printable, or false otherwise. | |
| template<> | |
| const bool | is_printable< char > (const char ch) noexcept |
| Returns true if character ch is printable, or false otherwise. | |
| template<> | |
| const bool | is_printable< wchar_t > (const wchar_t ch) noexcept |
| Returns true if character ch is punctuation, or false otherwise. Conforms to the current locale settings. | |
| template<class CharT> | |
| const bool | is_punctuation (const CharT ch) noexcept |
| Returns true if character ch is punctuation, or false otherwise. | |
| template<> | |
| const bool | is_punctuation< char > (const char ch) noexcept |
| Returns true if character ch is punctuation, or false otherwise. Conforms to the current locale settings. | |
| template<> | |
| const bool | is_punctuation< wchar_t > (const wchar_t ch) noexcept |
| Returns true if character ch is punctuation, or false otherwise. Conforms to the current locale settings. | |
| template<class CharT> | |
| const bool | is_space (const CharT ch) noexcept |
| Returns true if character ch is white space, or false otherwise. | |
| template<> | |
| const bool | is_space< char > (const char ch) noexcept |
| Returns true if character ch is alphabetic, or false otherwise. Conforms to the current locale settings. | |
| template<> | |
| const bool | is_space< wchar_t > (const wchar_t ch) noexcept |
| Returns true if character ch is alphabetic, or false otherwise. Conforms to the current locale settings. | |
| template<class CharT> | |
| const bool | is_upper (const CharT ch) noexcept |
| Returns true if character is uppercase, or false otherwise. | |
| template<> | |
| const bool | is_upper< char > (const char ch) noexcept |
| Returns true if character ch is uppercase, or false otherwise. Conforms to the current locale settings. | |
| template<> | |
| const bool | is_upper< wchar_t > (const wchar_t ch) noexcept |
| Returns true if character ch is uppercase, or false otherwise. Conforms to the current locale settings. | |
| CppString | operator""_cs (const char *str, std::size_t len) |
| Forms a CppString literal. | |
| CppWString | operator""_cs (const wchar_t *str, std::size_t len) |
| Forms a CppWString literal. | |
| template<class CharT> | |
| const CharT | swap_case (const CharT ch) noexcept |
| Returns the swapped case form of character ch if it exists, or ch itself otherwise. | |
| template<class CharT> | |
| const CharT | to_lower (const CharT ch) noexcept |
| Returns the lowercase form of character ch if it exists, or ch itself otherwise. | |
| template<> | |
| const char | to_lower< char > (const char ch) noexcept |
| Returns the lowercase form of character ch if it exists, or ch itself otherwise. Conforms to the current locale settings. | |
| template<> | |
| const wchar_t | to_lower< wchar_t > (const wchar_t ch) noexcept |
| Returns the lowercase form of character ch if it exists, or ch itself otherwise. Conforms to the current locale settings. | |
| template<class CharT> | |
| const CharT | to_upper (const CharT ch) noexcept |
| Returns the uppercase form of character ch if it exists, or ch itself otherwise. | |
| template<> | |
| const char | to_upper< char > (const char ch) noexcept |
| Returns the uppercase form of character ch if it exists, or ch itself otherwise. Conforms to the current locale settings. | |
| template<> | |
| const wchar_t | to_upper< wchar_t > (const wchar_t ch) noexcept |
| Returns the uppercase form of character ch if it exists, or ch itself otherwise. Conforms to the current locale settings. | |
Library cppstrings "What if c++ strings where as easy to use as Python strings?"
Copyright (C) 2023-2026 Philippe Schmouker contact - ph (dot) schmouker (at) gmail (dot) com
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.
| using pcs::CppString = CppStringT<char> |
Specialization of basic class with template argument 'char'.
| using pcs::CppWString = CppStringT<wchar_t> |
Specialization of basic class with template argument 'wchar_t'.
|
inlinenodiscardnoexcept |
struct of slices with default start values
SHOULD NEVER BE USED. Use next specializations instead.
Returns true if character ch is alphabetic, or false otherwise.
References is_alpha().
Referenced by is_alpha(), is_id_start(), pcs::CppStringT< char >::isalnum(), and pcs::CppStringT< char >::isalpha().
|
inlinenodiscardnoexcept |
Returns true if character ch is alphabetic, or false otherwise. Conforms to the current locale settings.
|
inlinenodiscardnoexcept |
Returns true if character ch is alphabetic, or false otherwise. Conforms to the current locale settings.
|
inlinenodiscardnoexcept |
Returns true if character ch gets ASCII code, or false otherwise.
Returns true if character has code point in the range U+0000-U+007F.
Referenced by pcs::CppStringT< char >::isascii().
|
inlinenodiscardnoexcept |
Returns true if character is a decimal digit, or false otherwise.
SHOULD NEVER BE USED. Use next specializations instead.
Referenced by is_digit(), is_digit< char >(), is_digit< wchar_t >(), is_id_continue(), is_numeric(), is_numeric< char >(), is_numeric< wchar_t >(), pcs::CppStringT< char >::isalnum(), and pcs::CppStringT< char >::isdecimal().
|
inlinenodiscardnoexcept |
Returns true if character is a decimal digit, or false otherwise.
|
inlinenodiscardnoexcept |
Returns true if character is a decimal digit, or false otherwise.
|
inlinenodiscardnoexcept |
Returns true if character is a decimal digit, or false otherwise.
SHOULD NEVER BE USED. Use next specializations instead.
References is_decimal().
Referenced by pcs::CppStringT< char >::isalnum().
|
inlinenodiscardnoexcept |
Returns true if character is a decimal digit, or false otherwise.
References is_decimal().
|
inlinenodiscardnoexcept |
Returns true if character is a decimal digit, or false otherwise.
References is_decimal().
|
inlinenodiscardnoexcept |
Returns true if character is a continuing char for identifiers, or false otherwise.
References is_decimal(), and is_id_start().
Referenced by pcs::CppStringT< char >::isidentifier().
|
inlinenodiscardnoexcept |
Returns true if character is a starting char for identifiers, or false otherwise.
References is_alpha().
Referenced by is_id_continue(), and pcs::CppStringT< char >::isidentifier().
|
inlinenodiscardnoexcept |
Returns true if character is lowercase, or false otherwise.
SHOULD NEVER BE USED. Use next specializations instead.
Referenced by pcs::CppStringT< char >::islower(), and swap_case().
|
inlinenodiscardnoexcept |
Returns true if character ch is lowercase, or false otherwise. Conforms to the current locale settings.
|
inlinenodiscardnoexcept |
Returns true if character ch is lowercase, or false otherwise. Conforms to the current locale settings.
|
inlinenodiscardnoexcept |
Returns true if character is a decimal digit, or false otherwise.
SHOULD NEVER BE USED. Use next specializations instead.
References is_decimal().
Referenced by pcs::CppStringT< char >::isalnum().
|
inlinenodiscardnoexcept |
Returns true if character is a decimal digit, or false otherwise.
References is_decimal().
|
inlinenodiscardnoexcept |
Returns true if character is a decimal digit, or false otherwise.
References is_decimal().
|
inlinenodiscardnoexcept |
Returns true if character ch is printable, or false otherwise.
SHOULD NEVER BE USED. Use next specializations instead.
Referenced by pcs::CppStringT< char >::isprintable().
|
inlinenodiscardnoexcept |
Returns true if character ch is printable, or false otherwise.
|
inlinenodiscardnoexcept |
Returns true if character ch is punctuation, or false otherwise. Conforms to the current locale settings.
|
inlinenodiscardnoexcept |
Returns true if character ch is punctuation, or false otherwise.
SHOULD NEVER BE USED. Use next specializations instead.
Referenced by pcs::CppStringT< char >::is_words_sep(), and pcs::CppStringT< char >::ispunctuation().
|
inlinenodiscardnoexcept |
Returns true if character ch is punctuation, or false otherwise. Conforms to the current locale settings.
|
inlinenodiscardnoexcept |
Returns true if character ch is punctuation, or false otherwise. Conforms to the current locale settings.
|
inlinenodiscardnoexcept |
Returns true if character ch is white space, or false otherwise.
SHOULD NEVER BE USED. Use next specializations instead.
Referenced by pcs::CppStringT< char >::is_words_sep(), and pcs::CppStringT< char >::isspace().
|
inlinenodiscardnoexcept |
Returns true if character ch is alphabetic, or false otherwise. Conforms to the current locale settings.
|
inlinenodiscardnoexcept |
Returns true if character ch is alphabetic, or false otherwise. Conforms to the current locale settings.
|
inlinenodiscardnoexcept |
Returns true if character is uppercase, or false otherwise.
SHOULD NEVER BE USED. Use next specializations instead.
Referenced by pcs::CppStringT< char >::isupper(), and swap_case().
|
inlinenodiscardnoexcept |
Returns true if character ch is uppercase, or false otherwise. Conforms to the current locale settings.
|
inlinenodiscardnoexcept |
Returns true if character ch is uppercase, or false otherwise. Conforms to the current locale settings.
|
inline |
Forms a CppString literal.
|
inline |
Forms a CppWString literal.
|
inlinenodiscardnoexcept |
Returns the swapped case form of character ch if it exists, or ch itself otherwise.
References is_lower(), is_upper(), to_lower(), and to_upper().
Referenced by pcs::CppStringT< char >::swapcase().
|
inlinenodiscardnoexcept |
Returns the lowercase form of character ch if it exists, or ch itself otherwise.
SHOULD NEVER BE USED. Use next specializations instead.
Referenced by swap_case().
|
inlinenodiscardnoexcept |
Returns the lowercase form of character ch if it exists, or ch itself otherwise. Conforms to the current locale settings.
|
inlinenodiscardnoexcept |
Returns the lowercase form of character ch if it exists, or ch itself otherwise. Conforms to the current locale settings.
|
inlinenodiscardnoexcept |
Returns the uppercase form of character ch if it exists, or ch itself otherwise.
SHOULD NEVER BE USED. Use next specializations instead.
Referenced by pcs::CppStringT< char >::capitalize(), and swap_case().
|
inlinenodiscardnoexcept |
Returns the uppercase form of character ch if it exists, or ch itself otherwise. Conforms to the current locale settings.
|
inlinenodiscardnoexcept |
Returns the uppercase form of character ch if it exists, or ch itself otherwise. Conforms to the current locale settings.