PCL
|
Unicode (UTF-16) string. More...
#include <String.h>
Public Member Functions | |
String ()=default | |
String (bool x) | |
String (char16_t c, size_type n) | |
String (char8_type c, size_type n=1) | |
String (char_type c, size_type n) | |
String (Complex< double > &x) | |
String (Complex< float > &x) | |
String (Complex< long double > &x) | |
String (const char16_t *t) | |
String (const char16_t *t, size_type i, size_type n) | |
String (const String &)=default | |
String (const string8_base &s) | |
String (const string_base &s) | |
String (const wchar_t *t) | |
String (const wchar_t *t, size_type i, size_type n) | |
String (const_c_string8 t) | |
String (const_c_string8 t, size_type i, size_type n) | |
String (const_char8_iterator i, const_char8_iterator j) | |
String (const_iterator i, const_iterator j) | |
String (const_iterator t) | |
String (const_iterator t, size_type i, size_type n) | |
String (double x) | |
String (float x) | |
String (int x) | |
String (long double x) | |
String (long long x) | |
String (long x) | |
String (short x) | |
String (std::initializer_list< char8_type > l) | |
String (std::initializer_list< char_type > l) | |
String (String &&)=default | |
String (string_base &&s) | |
String (unsigned int x) | |
String (unsigned long long x) | |
String (unsigned long x) | |
String (unsigned short x) | |
String (wchar_t c, size_type n) | |
String & | AppendFormat (const wchar_t *fmt,...) |
String & | AppendFormat (const_c_string8 fmt,...) |
int | AppendVFormat (const wchar_t *fmt, va_list paramList) |
int | AppendVFormat (const_c_string8 fmt, va_list paramList) |
void | Assign (char16_t c, size_type n=1) |
void | Assign (char8_type c, size_type n=1) |
void | Assign (char_type c, size_type n=1) |
void | Assign (const char16_t *t) |
void | Assign (const char16_t *t, size_type i, size_type n) |
void | Assign (const String &s) |
void | Assign (const String &s, size_type i, size_type n) |
void | Assign (const string8_base &s) |
void | Assign (const wchar_t *t) |
void | Assign (const wchar_t *t, size_type i, size_type n) |
void | Assign (const_c_string8 t) |
void | Assign (const_c_string8 t, size_type i, size_type n) |
void | Assign (const_char8_iterator p, const_char8_iterator q) |
void | Assign (const_iterator i, const_iterator j) |
void | Assign (const_iterator t) |
void | Assign (const_iterator t, size_type i, size_type n) |
void | Assign (std::initializer_list< char8_type > l) |
void | Assign (std::initializer_list< char_type > l) |
void | Assign (wchar_t c, size_type n=1) |
String | DecodedHTMLSpecialChars () const |
String | EncodedHTMLSpecialChars () const |
String & | Format (const wchar_t *fmt,...) |
String & | Format (const_c_string8 fmt,...) |
String & | operator= (char16_t c) |
String & | operator= (char8_type c) |
String & | operator= (char_type c) |
String & | operator= (const char16_t *t) |
String & | operator= (const String &s) |
String & | operator= (const string8_base &s) |
String & | operator= (const string_base &s) |
String & | operator= (const wchar_t *t) |
String & | operator= (const_c_string8 t) |
String & | operator= (const_iterator t) |
String & | operator= (String &&s) |
String & | operator= (string_base &&s) |
String & | operator= (wchar_t c) |
void | ParseISO8601DateTime (int &year, int &month, int &day, double &dayf, double &tz) const |
Array< double > | ParseListOfDouble (char separator=',', size_type maxCount=~size_type(0)) const |
GenericVector< double > | ParseListOfDoubleAsVector (char separator=',', int maxCount=int_max) const |
Array< float > | ParseListOfFloat (char separator=',', size_type maxCount=~size_type(0)) const |
GenericVector< float > | ParseListOfFloatAsVector (char separator=',', int maxCount=int_max) const |
void | ParseSexagesimal (int &sign, int &s1, int &s2, double &s3, const Array< char_type > &separators) const |
void | ParseSexagesimal (int &sign, int &s1, int &s2, double &s3, const String &separator=':') const |
double | SexagesimalToDouble (const Array< char_type > &separators) const |
double | SexagesimalToDouble (const String &separator=':') const |
IsoString | To7BitASCII () const |
bool | ToBool () const |
template<class C > | |
String & | ToColonSeparated (const C &c) |
template<class C > | |
String & | ToCommaSeparated (const C &c) |
String & | ToDecodedHTMLSpecialChars () |
double | ToDouble () const |
String & | ToEncodedHTMLSpecialChars () |
float | ToFloat () const |
template<class C > | |
String & | ToHyphenated (const C &c) |
long | ToInt () const |
long | ToInt (int base) const |
long long | ToInt64 () const |
long long | ToInt64 (int base) const |
IsoString | ToIsoString () const |
IsoString | ToLocal8Bit () const |
IsoString | ToMBS () const |
template<class C > | |
String & | ToNewLineSeparated (const C &c) |
template<class C > | |
String & | ToNullSeparated (const C &c) |
template<class C > | |
String & | ToSeparated (const C &c, char_type separator) |
template<class C , class AF > | |
String & | ToSeparated (const C &c, char_type separator, AF append) |
template<class C > | |
String & | ToSeparated (const C &c, const String &separator) |
template<class C , class AF > | |
String & | ToSeparated (const C &c, const String &separator, AF append) |
template<class C > | |
String & | ToSeparated (const C &c, const_c_string separator) |
template<class C , class AF > | |
String & | ToSeparated (const C &c, const_c_string separator, AF append) |
template<class C > | |
String & | ToSeparated (const C &c, const_c_string8 separator) |
template<class C , class AF > | |
String & | ToSeparated (const C &c, const_c_string8 separator, AF append) |
template<class C > | |
String & | ToSpaceSeparated (const C &c) |
template<class C > | |
String & | ToTabSeparated (const C &c) |
unsigned long | ToUInt () const |
unsigned long | ToUInt (int base) const |
unsigned long long | ToUInt64 () const |
unsigned long long | ToUInt64 (int base) const |
Array< uint32 > | ToUTF32 (size_type i=0, size_type n=maxPos) const |
IsoString | ToUTF8 (size_type i=0, size_type n=maxPos) const |
Array< wchar_t > | ToWCharArray (size_type i=0, size_type n=maxPos) const |
bool | TryParseISO8601DateTime (int &year, int &month, int &day, double &dayf, double &tz) const noexcept |
bool | TryParseSexagesimal (int &sign, int &s1, int &s2, double &s3, const Array< char_type > &separators) const noexcept |
bool | TryParseSexagesimal (int &sign, int &s1, int &s2, double &s3, const String &separator=':') const noexcept |
bool | TrySexagesimalToDouble (double &value, const Array< char_type > &separators) const noexcept |
bool | TrySexagesimalToDouble (double &value, const String &separator=':') const noexcept |
bool | TryToBool (bool &value) const noexcept |
bool | TryToDouble (double &value) const noexcept |
bool | TryToFloat (float &value) const noexcept |
bool | TryToInt (int &value) const noexcept |
bool | TryToInt (int &value, int base) const noexcept |
bool | TryToInt64 (long long &value) const noexcept |
bool | TryToInt64 (long long &value, int base) const noexcept |
bool | TryToUInt (unsigned &value) const noexcept |
bool | TryToUInt (unsigned &value, int base) const noexcept |
bool | TryToUInt64 (unsigned long long &value) const noexcept |
bool | TryToUInt64 (unsigned long long &value, int base) const noexcept |
int | VFormat (const wchar_t *fmt, va_list paramList) |
int | VFormat (const_c_string8 fmt, va_list paramList) |
Public Member Functions inherited from pcl::GenericString< char16_type, CharTraits, PCL_STRING_ALLOCATOR > | |
GenericString () | |
GenericString (char_type c, size_type n=1) | |
GenericString (const GenericString &s) | |
GenericString (const_c_string t) | |
GenericString (const_c_string t, size_type i, size_type n) | |
GenericString (const_iterator i, const_iterator j) | |
GenericString (GenericString &&s) | |
GenericString (std::initializer_list< char_type > l) | |
~GenericString () | |
void | Add (char_type c, size_type n=1) |
void | Add (const GenericString< char16_type, R1, A1 > &s) |
void | Add (const_c_string t) |
void | Add (const_c_string t, size_type n) |
void | Add (const_iterator i, const_iterator j) |
const allocator & | Allocator () const noexcept |
void | Append (char_type c, size_type n=1) |
void | Append (const GenericString< char16_type, R1, A1 > &s) |
void | Append (const_c_string t) |
void | Append (const_c_string t, size_type n) |
void | Append (const_iterator i, const_iterator j) |
void | Assign (char_type c, size_type n=1) |
void | Assign (const GenericString &s) |
void | Assign (const GenericString &s, size_type i, size_type n) |
void | Assign (const_c_string t) |
void | Assign (const_c_string t, size_type i, size_type n) |
void | Assign (const_iterator i, const_iterator j) |
void | Assign (std::initializer_list< char_type > l) |
iterator | At (size_type i) |
const_iterator | At (size_type i) const noexcept |
size_type | Available () const noexcept |
iterator | Begin () |
iterator | begin () |
const_iterator | Begin () const noexcept |
const_iterator | begin () const noexcept |
size_type | Break (C &list, char_type c, bool trim=false, size_type i=0) const |
size_type | Break (C &list, const Array< S > &ca, bool trim=false, size_type i=0) const |
size_type | Break (C &list, const GenericString< char16_type, R1, A1 > &s, bool trim=false, size_type i=0) const |
size_type | Break (C &list, const_c_string s, bool trim=false, size_type i=0) const |
size_type | BreakIC (C &list, char_type c, bool trim=false, size_type i=0) const |
size_type | BreakIC (C &list, const GenericString< char16_type, R1, A1 > &s, bool trim=false, size_type i=0) const |
size_type | BreakIC (C &list, const_c_string s, bool trim=false, size_type i=0) const |
void | c_copy (iterator dst, size_type maxCharsToCopy, size_type i=0) const noexcept |
const_c_string | c_str () const noexcept |
size_type | Capacity () const noexcept |
GenericString | CaseFolded () const |
GenericString | CenterJustified (size_type width, char_type fill=R::Blank()) const |
void | Clear () |
int | Compare (char_type c, bool caseSensitive=true, bool localeAware=true) const noexcept |
int | Compare (const GenericString< char16_type, R1, A1 > &s, bool caseSensitive=true, bool localeAware=true) const noexcept |
int | Compare (const_c_string t, bool caseSensitive=true, bool localeAware=true) const noexcept |
int | CompareCodePoints (char_type c, bool caseSensitive=true) const noexcept |
int | CompareCodePoints (const GenericString< char16_type, R1, A1 > &s, bool caseSensitive=true) const noexcept |
int | CompareCodePoints (const_c_string t, bool caseSensitive=true) const noexcept |
int | CompareIC (char_type c, bool localeAware=true) const noexcept |
int | CompareIC (const GenericString< char16_type, R1, A1 > &s, bool localeAware=true) const noexcept |
int | CompareIC (const_c_string t, bool localeAware=true) const noexcept |
bool | Contains (char_type c) const noexcept |
bool | Contains (const GenericString< char16_type, R1, A1 > &s) const noexcept |
bool | Contains (const_c_string t) const noexcept |
bool | ContainsIC (char_type c) const noexcept |
bool | ContainsIC (const GenericString< char16_type, R1, A1 > &s) const noexcept |
bool | ContainsIC (const_c_string t) const noexcept |
void | Delete (size_type i, size_type n=1) |
void | DeleteChar (char_type c, size_type i=0) |
void | DeleteCharIC (char_type c, size_type i=0) |
void | DeleteLeft (size_type i) |
void | DeleteRight (size_type i) |
void | DeleteString (const GenericString< char16_type, R1, A1 > &s, size_type i=0) |
void | DeleteString (const_c_string t, size_type i=0) |
void | DeleteStringIC (const GenericString< char16_type, R1, A1 > &s, size_type i=0) |
void | DeleteStringIC (const_c_string t, size_type i=0) |
GenericString | DoubleQuoted () const |
GenericString | Enclosed (char_type c) const |
iterator | End () |
iterator | end () |
const_iterator | End () const noexcept |
const_iterator | end () const noexcept |
bool | EndsWith (char_type c) const noexcept |
bool | EndsWith (const GenericString< char16_type, R1, A1 > &s) const noexcept |
bool | EndsWith (const_c_string t) const noexcept |
bool | EndsWithIC (char_type c) const noexcept |
bool | EndsWithIC (const GenericString< char16_type, R1, A1 > &s) const noexcept |
bool | EndsWithIC (const_c_string t) const noexcept |
void | EnsureDoubleQuoted () |
void | EnsureEnclosed (char_type c) |
void | EnsureSingleQuoted () |
void | EnsureUnique () |
void | Fill (char_type c) |
void | Fill (char_type c, size_type i, size_type n=maxPos) |
size_type | Find (char_type c, size_type i=0) const noexcept |
size_type | Find (const GenericString< char16_type, R1, A1 > &s, size_type i=0) const noexcept |
size_type | Find (const_c_string t, size_type i=0) const noexcept |
size_type | FindFirst (char_type c, size_type i=0) const noexcept |
size_type | FindFirst (const GenericString< char16_type, R1, A1 > &s, size_type i=0) const noexcept |
size_type | FindFirst (const_c_string t, size_type i=0) const noexcept |
size_type | FindFirstIC (char_type c, size_type i=0) const noexcept |
size_type | FindFirstIC (const GenericString< char16_type, R1, A1 > &s, size_type i=0) const noexcept |
size_type | FindFirstIC (const_c_string t, size_type i=0) const noexcept |
size_type | FindIC (char_type c, size_type i=0) const noexcept |
size_type | FindIC (const GenericString< char16_type, R1, A1 > &s, size_type i=0) const noexcept |
size_type | FindIC (const_c_string t, size_type i=0) const noexcept |
size_type | FindLast (char_type c, size_type r=maxPos) const noexcept |
size_type | FindLast (const GenericString< char16_type, R1, A1 > &s, size_type r=maxPos) const noexcept |
size_type | FindLast (const_c_string t, size_type r=maxPos) const noexcept |
size_type | FindLastIC (char_type c, size_type r=maxPos) const noexcept |
size_type | FindLastIC (const GenericString< char16_type, R1, A1 > &s, size_type r=maxPos) const noexcept |
size_type | FindLastIC (const_c_string t, size_type r=maxPos) const noexcept |
char_type | FirstChar () const noexcept |
uint64 | Hash (uint64 seed=0) const noexcept |
uint32 | Hash32 (uint32 seed=0) const noexcept |
uint64 | Hash64 (uint64 seed=0) const noexcept |
bool | HasWildcards () const noexcept |
size_type | IndexAt (const_iterator i) const noexcept |
void | Insert (size_type i, char_type c, size_type n=1) |
void | Insert (size_type i, const GenericString< char16_type, R1, A1 > &s) |
void | Insert (size_type i, const_c_string t) |
void | Insert (size_type i, const_c_string t, size_type n) |
void | Insert (size_type i, const_iterator p, const_iterator q) |
bool | IsAliasOf (const GenericString &s) const noexcept |
bool | IsEmpty () const noexcept |
bool | IsNumeral () const noexcept |
bool | IsSymbol () const noexcept |
bool | IsUnique () const noexcept |
bool | IsValid () const noexcept |
bool | IsValidIdentifier () const noexcept |
bool | IsValidIdentifier (distance_type &pos) const noexcept |
void | JustifyCenter (size_type width, char_type fill=R::Blank()) |
void | JustifyLeft (size_type width, char_type fill=R::Blank()) |
void | JustifyRight (size_type width, char_type fill=R::Blank()) |
char_type | LastChar () const noexcept |
GenericString | Left (size_type n) const |
GenericString | LeftJustified (size_type width, char_type fill=R::Blank()) const |
size_type | Length () const noexcept |
size_type | LowerBound () const noexcept |
GenericString | Lowercase () const |
char_type & | operator* () |
char_type | operator* () const noexcept |
GenericString & | operator+= (char_type c) |
GenericString & | operator+= (const GenericString< char16_type, R1, A1 > &s) |
GenericString & | operator+= (const_c_string t) |
GenericString & | operator-= (char_type c) |
GenericString & | operator-= (const GenericString< char16_type, R1, A1 > &s) |
GenericString & | operator-= (const_c_string t) |
GenericString & | operator= (char_type c) |
GenericString & | operator= (const GenericString &s) |
GenericString & | operator= (const_c_string t) |
GenericString & | operator= (GenericString &&s) |
char_type & | operator[] (size_type i) |
char_type | operator[] (size_type i) const noexcept |
GenericString | Prefix (size_type i) const |
void | Prepend (char_type c, size_type n=1) |
void | Prepend (const GenericString< char16_type, R1, A1 > &s) |
void | Prepend (const_c_string t) |
void | Prepend (const_c_string t, size_type n) |
void | Prepend (const_iterator i, const_iterator j) |
c_string | Release () |
void | Replace (size_type i, size_type n, char_type c, size_type nc=1) |
void | Replace (size_type i, size_type n, const GenericString< char16_type, R1, A1 > &s) |
void | Replace (size_type i, size_type n, const_c_string t) |
void | ReplaceChar (char_type c1, char_type c2, size_type i=0, size_type n=maxPos) |
void | ReplaceCharIC (char_type c1, char_type c2, size_type i=0, size_type n=maxPos) |
void | ReplaceString (const GenericString< char16_type, R1, A1 > &s1, const GenericString< char16_type, R2, A2 > &s2, size_type i=0) |
void | ReplaceString (const_c_string t1, const_c_string t2, size_type i=0) |
void | ReplaceStringIC (const GenericString< char16_type, R1, A1 > &s1, const GenericString< char16_type, R2, A2 > &s2, size_type i=0) |
void | ReplaceStringIC (const_c_string t1, const_c_string t2, size_type i=0) |
void | Reserve (size_type n) |
GenericString | ResizedToNullTerminated () const |
void | ResizeToNullTerminated () |
void | Reverse () |
reverse_iterator | ReverseBegin () |
const_reverse_iterator | ReverseBegin () const noexcept |
GenericString | Reversed () const |
reverse_iterator | ReverseEnd () |
const_reverse_iterator | ReverseEnd () const noexcept |
GenericString | Right (size_type n) const |
GenericString | RightJustified (size_type width, char_type fill=R::Blank()) const |
void | SecureFill (char c='\0') noexcept |
void | SetAllocator (const allocator &a) |
void | SetLength (size_type n) |
GenericString | SetToLength (size_type n) const |
GenericString | SingleQuoted () const |
size_type | Size () const noexcept |
void | Sort () |
void | Sort (BP p) |
GenericString | Sorted () const |
GenericString | Sorted (BP p) const |
void | Squeeze () |
GenericString | Squeezed () const |
bool | StartsWith (char_type c) const noexcept |
bool | StartsWith (const GenericString< char16_type, R1, A1 > &s) const noexcept |
bool | StartsWith (const_c_string t) const noexcept |
bool | StartsWithIC (char_type c) const noexcept |
bool | StartsWithIC (const GenericString< char16_type, R1, A1 > &s) const noexcept |
bool | StartsWithIC (const_c_string t) const noexcept |
GenericString | Substring (size_type i, size_type n=maxPos) const |
GenericString | Suffix (size_type i) const |
void | Swap (GenericString &s) noexcept |
void | ToCaseFolded () |
void | ToLowercase () |
void | ToUppercase () |
void | Transfer (GenericString &&s) |
void | Transfer (GenericString &s) |
void | Trim () |
void | TrimLeft () |
GenericString | Trimmed () const |
GenericString | TrimmedLeft () const |
GenericString | TrimmedRight () const |
void | TrimRight () |
void | Unquote () |
GenericString | Unquoted () const |
size_type | UpperBound () const noexcept |
GenericString | Uppercase () const |
bool | WildMatch (const GenericString< char16_type, R1, A1 > &pattern, bool caseSensitive=true) const noexcept |
bool | WildMatch (const_c_string pattern, bool caseSensitive=true) const noexcept |
bool | WildMatchIC (const GenericString< char16_type, R1, A1 > &pattern) const noexcept |
bool | WildMatchIC (const_c_string pattern) const noexcept |
Additional Inherited Members | |
Static Public Attributes inherited from pcl::GenericString< char16_type, CharTraits, PCL_STRING_ALLOCATOR > | |
static const size_type | maxPos |
static const size_type | notFound |
String derives from an instantiation of GenericString for char16_type
. It represents a dynamic string of characters in 16-bit Unicode Transformation Format (UTF-16) on the PixInsight platform.
using pcl::String::string8_base = GenericString<char, IsoCharTraits, PCL_STRING_ALLOCATOR> |
using pcl::String::string_base = GenericString<char16_type, CharTraits, PCL_STRING_ALLOCATOR> |
|
default |
Constructs an empty String object.
|
inline |
|
default |
Copy constructor.
|
inline |
|
default |
Move constructor.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Constructs a String with a copy of the character sequence stored in the specified initializer list l.
This constructor is equivalent to:
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inline |
Appends a formatted representation of a variable-length set of values to the current contents of this string. Returns a reference to this string.
The fmt null-terminated string is a standard printf format string of wchar_t
characters. It follows the same rules as its counterpart parameter in the standard wprintf( const wchar_t* fmt, ... ) C runtime function.
The required space to store the resulting formatted output is calculated and allocated transparently.
|
inline |
Appends a formatted representation of a variable-length set of values to the current contents of this string. Returns a reference to this string.
The fmt null-terminated string is a standard printf format string. It follows the same rules as its counterpart parameter in the standard printf( const char* fmt, ... ) C runtime function.
The required space to store the resulting formatted output is calculated and allocated transparently.
Definition at line 11103 of file String.h.
Referenced by pcl::BicubicFilterPixelInterpolation::Description(), pcl::Lanczos3LUTPixelInterpolation::Description(), pcl::Lanczos4LUTPixelInterpolation::Description(), and pcl::Lanczos5LUTPixelInterpolation::Description().
int pcl::String::AppendVFormat | ( | const wchar_t * | fmt, |
va_list | paramList | ||
) |
Appends a formatted representation of a variable-length set of values, specified as a va_list
standard parameter list, to the current contents of this string. Returns the number of characters appended.
The fmt null-terminated string is a standard printf format string of wchar_t
characters. It follows the same rules as its counterpart parameter in the standard wprintf( const wchar_t* fmt, ... ) C runtime function.
The required space to store the resulting formatted output is calculated and allocated transparently.
|
inline |
Appends a formatted representation of a variable-length set of values, specified as a va_list
standard parameter list, to the current contents of this string. Returns the number of characters appended.
The fmt null-terminated string is a standard printf format string. It follows the same rules as its counterpart parameter in the standard printf( const char* fmt, ... ) C runtime function.
The required space to store the resulting formatted output is calculated and allocated transparently.
Definition at line 11146 of file String.h.
References pcl::IsoString::VFormat().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Assigns a copy of the 8-bit ISO/IEC-8859-1 string s to this string.
Definition at line 8864 of file String.h.
References pcl::GenericString< T, R, A >::Begin(), and pcl::GenericString< T, R, A >::Length().
void pcl::String::Assign | ( | const wchar_t * | t | ) |
Assigns a null-terminated string t of wchar_t
to this string.
Assigns a contiguous segment of n characters of a null-terminated string t of wchar_t
, starting from its i-th character, to this string.
|
inline |
|
inline |
Assigns a contiguous segment of n characters of a null-terminated 8-bit ISO/IEC-8859-1 string t, starting from its i-th character, to this string.
Definition at line 8902 of file String.h.
References pcl::Min().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Assigns a sequence of 8-bit ISO/IEC-8859-1 characters defined by the specified initializer list l to this string. This function is equivalent to:
|
inline |
|
inline |
|
static |
Returns an ASCII representation of the current local date and time in ISO 8601 extended format.
options | Optional settings to control the representation of date and time in ISO 8601 format. |
|
static |
Returns an ASCII representation of the current UTC date and time in ISO 8601 extended format.
options | Optional settings to control the representation of date and time in ISO 8601 format. |
|
inline |
Returns a duplicate of this string with all occurrences of special HTML entities replaced with their corresponding plain text character equivalents.
|
inline |
Returns a duplicate of this string with all occurrences of HTML special characters replaced with valid HTML entities.
|
inline |
Replaces the contents of this string with a formatted representation of a variable-length set of values. Returns a reference to this string.
The fmt null-terminated string is a standard printf format string of wchar_t
characters. It follows the same rules as its counterpart parameter in the standard wprintf( const wchar_t* fmt, ... ) C runtime function.
The required space to store the resulting formatted output is calculated and allocated transparently.
|
inline |
Replaces the contents of this string with a formatted representation of a variable-length set of values. Returns a reference to this string.
The fmt null-terminated string is a standard printf format string. It follows the same rules as its counterpart parameter in the standard printf( const char* fmt, ... ) C runtime function.
The required space to store the resulting formatted output is calculated and allocated transparently.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void pcl::String::ParseISO8601DateTime | ( | int & | year, |
int & | month, | ||
int & | day, | ||
double & | dayf, | ||
double & | tz | ||
) | const |
Evaluates this string as a date and time specification in ISO 8601 extended format, and stores the resulting components in the specified variables.
year | On output, the year of the date. |
month | On output, the month of the date in the range [1,12]. |
day | On output, the day of the date in the range [1,31]. |
dayf | On output, the day fraction corresponding to the time specification, in the range [0,1). |
tz | On output, the time zone offset in hours, in the range [-12,+12]. |
In ISO 8601 extended representations, decimal fractions must be divided from integer parts exclusively by the full stop or dot character ('.', ASCII code point 46(10) = 2E(16)).
Referenced by pcl::TimePoint::TimePoint(), and pcl::TimePoint::FromString().
Array<double> pcl::String::ParseListOfDouble | ( | char | separator = ',' , |
size_type | maxCount = ~size_type(0) |
||
) | const |
Evaluates this string as a sequence:
<f1><sep><f2><sep> ... <sep><fn>
as a list <f1><f2>...<fn> of 64-bit floating point values separated by <sep> separator characters.
separator | The separator character. Cannot be a character pertaining to a floating point numeric representation (decimal digit [09], sign character [+-], decimal separator '.' or exponent delimiter [eE]). If not specified, the default separator is a comma character ','. |
maxCount | The maximum number of values allowed. If the parsed list includes more than this number of elements, a ParseError exception will be thrown with the appropriate error message. If this parameter is not specified, there is no practical limit on the list's length by default. |
Returns a dynamic array of double
values. Returns an empty array if this string is either empty or entirely composed of trimmable characters.
For each element in the parsed list, trimmable characters (whitespace) are ignored. Empty list elements (that is, sequences of contiguous separator characters, or separators separated by trimmable characters) are not allowed. In the event of syntactic errors or invalid or unrepresentable values, this function throws a ParseError exception.
GenericVector<double> pcl::String::ParseListOfDoubleAsVector | ( | char | separator = ',' , |
int | maxCount = int_max |
||
) | const |
Returns a new vector initialized with 64-bit floating point component values evaluated from this string.
This function performs the same task as ParseListOfDouble() but builds and returns a GenericVector object instead of Array.
Array<float> pcl::String::ParseListOfFloat | ( | char | separator = ',' , |
size_type | maxCount = ~size_type(0) |
||
) | const |
Evaluates this string as a sequence:
<f1><sep><f2><sep> ... <sep><fn>
as a list <f1><f2>...<fn> of 32-bit floating point values separated by <sep> separator characters.
separator | The separator character. Cannot be a character pertaining to a floating point numeric representation (decimal digit [09], sign character [+-], decimal separator '.' or exponent delimiter [eE]). If not specified, the default separator is a comma character ','. |
maxCount | The maximum number of values allowed. If the parsed list includes more than this number of elements, a ParseError exception will be thrown with the appropriate error message. If this parameter is not specified, there is no practical limit on the list's length by default. |
Returns a dynamic array of float
values. Returns an empty array if this string is either empty or entirely composed of trimmable characters.
For each element in the parsed list, trimmable characters (whitespace) are ignored. Empty list elements (that is, sequences of contiguous separator characters, or separators separated by trimmable characters) are not allowed. In the event of syntactic errors or invalid or unrepresentable values, this function throws a ParseError exception.
GenericVector<float> pcl::String::ParseListOfFloatAsVector | ( | char | separator = ',' , |
int | maxCount = int_max |
||
) | const |
Returns a new vector initialized with 32-bit floating point component values evaluated from this string.
This function performs the same task as ParseListOfFloat() but builds and returns a GenericVector object instead of Array.
|
static |
Generates a string of n random 16-bit code points, with character types and ranges as prescribed by the specified options.
IsoString pcl::String::To7BitASCII | ( | ) | const |
Returns a 7-bit ASCII string with a converted copy of this String object. Characters in this string that cannot be converted to the 7-bit ASCII set (that is, characters with code points greater than 0x80) will have undefined values in the returned string. Undefined values are represented with question mark characters (?).
bool pcl::String::ToBool | ( | ) | const |
Evaluates this string as a Boolean literal, and returns the result as a bool
value.
Returns true
if this string is equal to "1", "true", "TRUE" or "T". Returns false
if this string is equal to "0", "false", "FALSE" or "F". Otherwise this function throws a ParseError exception.
|
inline |
Replaces the contents of this string with a sequence of colon-separated tokens extracted from a container c. Returns a reference to this string.
This member function is equivalent to:
|
inline |
Replaces the contents of this string with a sequence of comma-separated tokens extracted from a container c. Returns a reference to this string.
This member function is equivalent to:
String& pcl::String::ToDecodedHTMLSpecialChars | ( | ) |
Replaces all occurrences of special HTML entities in this string with their corresponding plain text character equivalents. Returns a reference to this string.
The following replacements are performed:
"\&" (ampersand) becomes '&'
"\"" (double quote) becomes '"'
"\'" (single quote) becomes "'"
"\'" (apostrophe) becomes "'"
"\<" (less than) becomes '<'
"\>" (greater than) becomes '>'
double pcl::String::ToDouble | ( | ) | const |
Evaluates this string as a floating point literal, and returns the result as a double
value.
The source string is expected to have the following format (informal format specification):
[+|-][<integer-part>][.[<decimal-part>]][<exp>[+|-]<exponent>]
where <integer-part> and <decimal-part> are optional sequences of decimal digits from 0 to 9, <exp> is an exponent specifier (the letter 'e' (or 'E')), and <exponent> is a sequence of decimal digits specifying a power of ten that multiplies the preceding numeric constant. At least a one-digit integer part, or a one-digit decimal part, is mandatory. FORTRAN exponent specifiers ('d' and 'f' (or 'D' and 'F')) are also recognized by this implementation.
If this string doesn't contain a valid floating point literal, or if the range of double
is exceeded, this member function throws a ParseError exception.
String& pcl::String::ToEncodedHTMLSpecialChars | ( | ) |
Replaces all occurrences of HTML special characters in this string with valid HTML entities. Returns a reference to this string.
The following replacements are performed:
'&' (ampersand) becomes "\&"
'"' (double quote) becomes "\""
"'" (single quote) becomes "\'"
'<' (less than) becomes "\<"
'>' (greater than) becomes "\>"
float pcl::String::ToFloat | ( | ) | const |
Evaluates this string as a floating point numeric literal, and returns the result as a float
value.
For information about the legal syntax of a floating point literal, see the documentation for the ToDouble() member function.
If this string doesn't contain a valid floating point literal, or if the range of float
is exceeded, this member function throws a ParseError exception.
|
inline |
Replaces the contents of this string with a hyphenated sequence of tokens extracted from a container c. Returns a reference to this string.
This member function is equivalent to:
|
inline |
Evaluates this string as an integer literal, and returns the result as a long
value.
Calling this member function for a string s
is equivalent to:
See the documentation under ToInt( int ) for information about automatic base conversions when base=0 is specified.
If this string doesn't contain a valid integer literal, or if the range of long
is exceeded, this member function throws a ParseError exception.
long pcl::String::ToInt | ( | int | base | ) | const |
Evaluates this string as an integer literal in the specified base, and returns the result as a long
value.
If base is 0, the source string is expected to represent either a decimal constant, an octal constant, or a hexadecimal constant, any of which optionally preceded by a sign character (+ or -). A decimal constant begins with a non-zero digit, and consists of a sequence of decimal digits from '0' to '9'. An octal begins with the prefix '0', optionally followed by a sequence of the digits 0 to 7 only. A hexadecimal constant begins with the prefix '0x' or '0X', which must be followed by a sequence of decimal digits and letters from 'a' (or 'A') to 'f' (or 'F'), whose corresponding decimal values are from 10 to 15, respectively.
Other legal values of base, from 2 to 36, specify the expected base of the integer constant represented by the source string. Decimal digits and letters from 'a' (or 'A') to 'z' (or 'Z') are used to represent all possible digits in the specified base, as necessary.
If this string doesn't contain a valid integer literal in the specified base, if an illegal base is specified, or if the range of long
is exceeded, this member function throws a ParseError exception.
|
inline |
Evaluates this string as an integer literal, and returns the result as a long
long
value.
Calling this member function for a string s
is equivalent to:
If this string doesn't contain a valid integer literal, or if the range of long
long
is exceeded, this member function throws a ParseError exception.
long long pcl::String::ToInt64 | ( | int | base | ) | const |
Evaluates this string as an unsigned integer literal in the specified base, and returns the result as a long
long
value.
For information about possible values of base and how these are interpreted, see the documentation under ToInt( int ).
If this string doesn't contain a valid integer literal in the specified base, if an illegal base is specified, or if the range of long
long
is exceeded, this member function throws a ParseError exception.
|
static |
Returns a string representation of a date and time in ISO 8601 extended format.
year | The year of the date. |
month | The month of the date in the range [1,12]. |
day | The day of the date in the range [1,31]. |
dayf | The day fraction corresponding to the time specification, in the range [0,1). |
tz | The time zone offset in hours, in the range [-12,+12]. The default value is zero, to be interpreted as UTC. |
options | Optional settings to control the representation of date and time in ISO 8601 format. |
IsoString pcl::String::ToIsoString | ( | ) | const |
Returns an 8-bit, ISO/IEC-8859-1 string with a converted copy of this String object. Characters in this string that cannot be converted to ISO-8859-1 (that is, characters with code points greater than 0x100) will have undefined values in the returned string. Undefined values are represented with question mark characters (?).
|
inline |
IsoString pcl::String::ToMBS | ( | ) | const |
Returns a copy of this Unicode string converted to a multibyte string. This conversion is dependent on the current locale.
In the event of conversion error (if there are invalid wide characters in the source string) this routine returns an empty string.
This member function is a convenience wrapper for the wcstombs() routine of the standard C runtime library. Note that on platforms where the size of wchar_t is four bytes (e.g. Linux) this routine performs an additional conversion from UTF-16 to UTF-32. On platforms where the size of wchar_t is two bytes (e.g. Windows), the conversion is direct.
|
inline |
Replaces the contents of this string with a sequence of new line separated tokens extracted from a container c. Returns a reference to this string.
This member function is equivalent to:
|
inline |
Replaces the contents of this string with a sequence of null-separated tokens extracted from a container c. Returns a reference to this string.
This member function is equivalent to:
Replaces the contents of this string with a sequence of tokens extracted from a container c, separated with the specified separator character. Returns a reference to this string.
The container type C must have separated list generation semantics. All iterable PCL containers such as Array, Vector, etc. provide the necessary ToSeparated member functions.
|
inline |
Replaces the contents of this string with a sequence of tokens extracted from a container c, separated with the specified separator character, and built using an append binary function. Returns a reference to this string.
The binary function must be of the form:
where c is being appended to s.
The container type C must have separated list generation semantics. All iterable PCL containers such as Array, Vector, etc. provide the necessary ToSeparated member functions.
|
inline |
Replaces the contents of this string with a sequence of tokens extracted from a container c, separated with the specified separator string. Returns a reference to this string.
The container type C must have separated list generation semantics. All iterable PCL containers such as Array, Vector, etc. provide the necessary ToSeparated member functions.
|
inline |
Replaces the contents of this string with a sequence of tokens extracted from a container c, separated with the specified separator string, and built using an append binary function. Returns a reference to this string.
The binary function must be of the form:
where s2 is being appended to s1.
The container type C must have separated list generation semantics. All iterable PCL containers such as Array, Vector, etc. provide the necessary ToSeparated member functions.
|
inline |
Replaces the contents of this string with a sequence of tokens extracted from a container c, separated with the specified separator null-terminated string. Returns a reference to this string.
The container type C must have separated list generation semantics. All iterable PCL containers such as Array, Vector, etc. provide the necessary ToSeparated member functions.
|
inline |
Replaces the contents of this string with a sequence of tokens extracted from a container c, separated with the specified separator null-terminated string, and built using an append binary function. Returns a reference to this string.
The binary function must be of the form:
where s2 is being appended to s1.
The container type C must have separated list generation semantics. All iterable PCL containers such as Array, Vector, etc. provide the necessary ToSeparated member functions.
|
inline |
Replaces the contents of this string with a sequence of tokens extracted from a container c, separated with the specified separator null-terminated 8-bit string (const char*). Returns a reference to this string.
The container type C must have separated list generation semantics. All iterable PCL containers such as Array, Vector, etc. provide the necessary ToSeparated member functions.
|
inline |
Replaces the contents of this string with a sequence of tokens extracted from a container c, separated with the specified separator null-terminated 8-bit string (const char*), and built using an append binary function. Returns a reference to this string.
The binary function must be of the form:
where s2 is being appended to s1.
The container type C must have separated list generation semantics. All iterable PCL containers such as Array, Vector, etc. provide the necessary ToSeparated member functions.
|
inline |
Replaces the contents of this string with a sequence of space-separated tokens extracted from a container c. Returns a reference to this string.
This member function is equivalent to:
|
inline |
Replaces the contents of this string with a sequence of tabulator-separated tokens extracted from a container c. Returns a reference to this string.
This member function is equivalent to:
|
inline |
Evaluates this string as an unsigned integer literal, and returns the result as an unsigned
long
value.
Calling this member function for a string s
is equivalent to:
See the documentation under ToInt( int ) for information about automatic base conversions when base=0 is specified.
If this string doesn't contain a valid unsigned integer literal, or if the range of unsigned
long
is exceeded, this member function throws a ParseError exception.
unsigned long pcl::String::ToUInt | ( | int | base | ) | const |
Evaluates this string as an unsigned integer literal in the specified base, and returns the result as an unsigned
long
value.
For information about possible values of base and how these are interpreted, see the documentation under ToInt( int ). The only exception is that for this member function, only a + sign is legal preceding the numeric constant represented by the source string.
If this string doesn't contain a valid integer literal in the specified base, if an illegal base is specified, or if the range of unsigned
long
is exceeded, this member function throws a ParseError exception.
|
inline |
Evaluates this string as an unsigned integer literal in the specified base, and returns the result as an unsigned
long
long
value.
Calling this member function for a string s
is equivalent to:
If this string doesn't contain a valid unsigned integer literal, or if the range of unsigned
long
long
is exceeded, this member function throws a ParseError exception.
unsigned long long pcl::String::ToUInt64 | ( | int | base | ) | const |
Evaluates this string as an unsigned integer literal in the specified base, and returns the result as an unsigned
long
long
value.
For information about possible values of base and how these are interpreted, see the documentation under ToInt( int ).
If this string doesn't contain a valid unsigned integer literal in the specified base, if an illegal base is specified, or if the range of unsigned
long
long
is exceeded, this member function throws a ParseError exception.
Returns a dynamic array of 32-bit integers with a UTF-32 representation of a subset of n contiguous UTF-16 characters from this String object, starting at the i-th character. A null terminating character (uint32( 0 ) specifically) is always appended to the resulting array.
Returns an 8-bit string with a UTF-8 representation of a subset of n contiguous UTF-16 characters from this String object, starting at the i-th character.
Returns a copy of a contiguous segment of n characters of this string, starting from its i-th character, as a dynamic array of wchar_t
. A null terminating character (L'\0' specifically) is always appended to the resulting array.
Depending on the platform, the wchar_t
type may be 16-bit wide (Windows) or 32-bit wide (UNIX/Linux). The char16_type used by String is always a 16-bit character (UTF-16) on all supported platforms.
This member function provides a platform-independent way to obtain the contents of a String object as a standard null-terminated string of wchar_t
characters.
On platforms where wchar_t occupies four bytes (UNIX/Linux), this function assumes that this String object contains no surrogates. For a generalized conversion from UTF-16 to UTF-32, see ToUTF32().
Definition at line 11366 of file String.h.
References pcl::Min().
|
noexcept |
Attempts to evaluate this string as a date and time specification in ISO 8601 extended format. If successful, stores the resulting components in the specified year, month, day and dayf and tz variables, and returns true
. For more information on syntax and output values and ranges, see the ParseISO8601DateTime().
If this string cannot be evaluated as a valid date and time in ISO 8601 format, this function returns false
and does not change any of the passed variables. This function does not throw any exception.
Referenced by pcl::TimePoint::TryFromString().
|
noexcept |
Attempts to evaluate this string as a Boolean literal.
If this string can legally be converted to a Boolean value, this function returns true
and stores the evaluation result in the value variable. A string can only be converted to Boolean type if it is equal to either "1", "true", "TRUE", "T", "0", "false", "FALSE" or "F".
If this string cannot be converted to a Boolean value, this function returns false
and does not change the value variable. This function does not throw any exception.
|
noexcept |
Attempts to evaluate this string as a floating point numeric literal.
If this string can legally be converted to a floating point number, this function returns true
and stores the evaluation result in the value variable. For information about the legal syntax of a floating point literal, see the documentation for the ToDouble() member function.
If this string cannot be converted to a floating point number, this function returns false
and does not change the value variable. This function does not throw any exception.
|
noexcept |
Attempts to evaluate this string as a floating point numeric literal.
If this string can legally be converted to a floating point number, this function returns true
and stores the evaluation result in the value variable. For information about the legal syntax of a floating point literal, see the documentation for the ToDouble() member function.
If this string cannot be converted to a floating point number, this function returns false
and does not change the value variable. This function does not throw any exception.
|
inlinenoexcept |
Attempts to evaluate this string as an integer numeric literal.
If this string can legally be converted to an integer number, this function returns true
and stores the evaluation result in the value variable.
Calling this member function for a string s
is equivalent to:
See the documentation under ToInt( int ) for information about automatic base conversions when base=0 is specified.
If this string cannot be converted to an integer number, this function returns false
and does not change the value variable. This function does not throw any exception.
|
noexcept |
Attempts to evaluate this string as an integer numeric literal in the specified base.
If this string can legally be converted to an integer number in the specified base, this function returns true
and stores the evaluation result in the value variable.
See the documentation under ToInt( int ) for information about automatic base conversions when base=0 is specified.
If this string cannot be converted to an integer number in the specified base, this function returns false
and does not change the value variable. This function does not throw any exception.
|
inlinenoexcept |
Attempts to evaluate this string as a 64-bit integer numeric literal in the specified base.
If this string can legally be converted to a 64-bit integer number in the specified base, this function returns true
and stores the evaluation result in the value variable.
Calling this member function for a string s
is equivalent to:
See the documentation under ToInt( int ) for information about automatic base conversions when base=0 is specified.
If this string cannot be converted to a 64-bit integer number, this function returns false
and does not change the value variable. This function does not throw any exception.
|
noexcept |
Attempts to evaluate this string as a 64-bit integer numeric literal in the specified base.
If this string can legally be converted to a 64-bit integer number in the specified base, this function returns true
and stores the evaluation result in the value variable.
For information about possible values of base and how these are interpreted, see the documentation under ToInt( int ).
If this string cannot be converted to a 64-bit integer number in the specified base, this function returns false
and does not change the value variable. This function does not throw any exception.
|
inlinenoexcept |
Attempts to evaluate this string as an unsigned integer literal.
If this string can legally be converted to an unsigned integer number, this function returns true
and stores the evaluation result in the value variable.
Calling this member function for a string s
is equivalent to:
See the documentation under ToInt( int ) for information about automatic base conversions when base=0 is specified.
If this string cannot be converted to an integer number, this function returns false
and does not change the value variable. This function does not throw any exception.
|
noexcept |
Attempts to evaluate this string as an unsigned integer literal in the specified base.
If this string can legally be converted to an unsigned integer number in the specified base, this function returns true
and stores the evaluation result in the value variable.
See the documentation under ToUInt( int ) for information about automatic base conversions when base=0 is specified.
If this string cannot be converted to an unsigned integer number in the specified base, this function returns false
and does not change the value variable. This function does not throw any exception.
|
inlinenoexcept |
Attempts to evaluate this string as a 64-bit unsigned integer numeric literal in the specified base.
If this string can legally be converted to a 64-bit unsigned integer number in the specified base, this function returns true
and stores the evaluation result in the value variable.
Calling this member function for a string s
is equivalent to:
See the documentation under ToInt( int ) for information about automatic base conversions when base=0 is specified.
If this string cannot be converted to a 64-bit unsigned integer number, this function returns false
and does not change the value variable. This function does not throw any exception.
|
noexcept |
Attempts to evaluate this string as an unsigned 64-bit integer numeric literal in the specified base.
If this string can legally be converted to an unsigned 64-bit integer number in the specified base, this function returns true
and stores the evaluation result in the value variable.
For information about possible values of base and how these are interpreted, see the documentation under ToInt( int ).
If this string cannot be converted to an unsigned 64-bit integer number in the specified base, this function returns false
and does not change the value variable. This function does not throw any exception.
|
static |
Conversion of a UTF-16 substring to a UTF-32 string.
Converts a contiguous sequence of n characters starting at the i-th position of the specified null-terminated UTF-16 string. Returns the resulting UTF-32 string as a dynamic array.
|
static |
Conversion of a UTF-16 substring to a UTF-8 string.
Converts a contiguous sequence of n characters starting at the i-th position of the specified null-terminated UTF-16 string. Returns the resulting UTF-8 string.
|
static |
Conversion of a UTF-32 substring to a UTF-16 string.
Converts a contiguous sequence of n characters starting at the i-th position of the specified null-terminated UTF-32 string. Returns the resulting UTF-16 string.
|
static |
Conversion of a UTF-8 substring to a UTF-16 string.
Converts a contiguous sequence of n characters starting at the i-th position of the specified null-terminated UTF-8 string. Returns the resulting UTF-16 string.
Referenced by pcl::IsoString::UTF8ToUTF16().
|
static |
Generates a universally unique identifier (UUID) in canonical form.
The canonical UUID has 36 characters with the following format:
xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx
where 'x' represents a lowercase hexadecimal digit, '4' is the UUID version indicator (version 4 = truly random UUID), and 'y' is one of '8', '9', 'a', or 'b'.
int pcl::String::VFormat | ( | const wchar_t * | fmt, |
va_list | paramList | ||
) |
Replaces the contents of this string with a formatted representation of a variable-length set of values, specified as a va_list
standard parameter list. Returns the number of characters generated.
The fmt null-terminated string is a standard printf format string of wchar_t
characters. It follows the same rules as its counterpart parameter in the standard wprintf( const wchar_t* fmt, ... ) C runtime function.
The required space to store the resulting formatted output is calculated and allocated transparently.
|
inline |
Replaces the contents of this string with a formatted representation of a variable-length set of values, specified as a va_list
standard parameter list. Returns the number of characters generated.
The fmt null-terminated string is a standard printf format string. It follows the same rules as its counterpart parameter in the standard printf( const char* fmt, ... ) C runtime function.
The required space to store the resulting formatted output is calculated and allocated transparently.
Definition at line 11126 of file String.h.
References pcl::IsoString::VFormat().