PCL
pcl::String Class Reference

Unicode (UTF-16) string. More...

#include <String.h>

+ Inheritance diagram for pcl::String:

Public Types

using allocator = string_base::allocator
 
using block_allocator = string_base::block_allocator
 
using c_string = string_base::c_string
 
using c_string8 = string8_base::c_string
 
using char8_iterator = string8_base::iterator
 
using char8_traits = string8_base::char_traits
 
using char8_type = string8_base::char_type
 
using char_traits = string_base::char_traits
 
using char_type = string_base::char_type
 
using const_c_string = string_base::const_c_string
 
using const_c_string8 = string8_base::const_c_string
 
using const_char8_iterator = string8_base::const_iterator
 
using const_iterator = string_base::const_iterator
 
using const_reverse_iterator = string_base::const_reverse_iterator
 
using iterator = string_base::iterator
 
using reverse_iterator = string_base::reverse_iterator
 
using string8_base = GenericString< char, IsoCharTraits, PCL_STRING_ALLOCATOR >
 
using string_base = GenericString< char16_type, CharTraits, PCL_STRING_ALLOCATOR >
 
- Public Types inherited from pcl::GenericString< char16_type, CharTraits, PCL_STRING_ALLOCATOR >
using allocator = pcl::Allocator< char16_type, PCL_STRING_ALLOCATOR >
 
using block_allocator = PCL_STRING_ALLOCATOR
 
using c_string = char16_type *
 
using char_traits = CharTraits
 
using char_type = char16_type
 
using const_c_string = const char16_type *
 
using const_iterator = const char16_type *
 
using const_reverse_iterator = ReverseRandomAccessIterator< const_iterator, const char16_type >
 
using iterator = char16_type *
 
using reverse_iterator = ReverseRandomAccessIterator< iterator, char16_type >
 

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)
 
StringAppendFormat (const wchar_t *fmt,...)
 
StringAppendFormat (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
 
StringFormat (const wchar_t *fmt,...)
 
StringFormat (const_c_string8 fmt,...)
 
Stringoperator= (char16_t c)
 
Stringoperator= (char8_type c)
 
Stringoperator= (char_type c)
 
Stringoperator= (const char16_t *t)
 
Stringoperator= (const String &s)
 
Stringoperator= (const string8_base &s)
 
Stringoperator= (const string_base &s)
 
Stringoperator= (const wchar_t *t)
 
Stringoperator= (const_c_string8 t)
 
Stringoperator= (const_iterator t)
 
Stringoperator= (String &&s)
 
Stringoperator= (string_base &&s)
 
Stringoperator= (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 >
StringToColonSeparated (const C &c)
 
template<class C >
StringToCommaSeparated (const C &c)
 
StringToDecodedHTMLSpecialChars ()
 
double ToDouble () const
 
StringToEncodedHTMLSpecialChars ()
 
float ToFloat () const
 
template<class C >
StringToHyphenated (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 >
StringToNewLineSeparated (const C &c)
 
template<class C >
StringToNullSeparated (const C &c)
 
template<class C >
StringToSeparated (const C &c, char_type separator)
 
template<class C , class AF >
StringToSeparated (const C &c, char_type separator, AF append)
 
template<class C >
StringToSeparated (const C &c, const String &separator)
 
template<class C , class AF >
StringToSeparated (const C &c, const String &separator, AF append)
 
template<class C >
StringToSeparated (const C &c, const_c_string separator)
 
template<class C , class AF >
StringToSeparated (const C &c, const_c_string separator, AF append)
 
template<class C >
StringToSeparated (const C &c, const_c_string8 separator)
 
template<class C , class AF >
StringToSeparated (const C &c, const_c_string8 separator, AF append)
 
template<class C >
StringToSpaceSeparated (const C &c)
 
template<class C >
StringToTabSeparated (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< uint32ToUTF32 (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 allocatorAllocator () 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=CharTraits ::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=CharTraits ::Blank())
 
void JustifyLeft (size_type width, char_type fill=CharTraits ::Blank())
 
void JustifyRight (size_type width, char_type fill=CharTraits ::Blank())
 
char_type LastChar () const noexcept
 
GenericString Left (size_type n) const
 
GenericString LeftJustified (size_type width, char_type fill=CharTraits ::Blank()) const
 
size_type Length () const noexcept
 
size_type LowerBound () const noexcept
 
GenericString Lowercase () const
 
char_typeoperator* ()
 
char_type operator* () const noexcept
 
GenericStringoperator+= (char_type c)
 
GenericStringoperator+= (const GenericString< char16_type, R1, A1 > &s)
 
GenericStringoperator+= (const_c_string t)
 
GenericStringoperator-= (char_type c)
 
GenericStringoperator-= (const GenericString< char16_type, R1, A1 > &s)
 
GenericStringoperator-= (const_c_string t)
 
GenericStringoperator= (char_type c)
 
GenericStringoperator= (const GenericString &s)
 
GenericStringoperator= (const_c_string t)
 
GenericStringoperator= (GenericString &&s)
 
char_typeoperator[] (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=CharTraits ::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
 

Static Public Member Functions

static String CurrentLocalISO8601DateTime (const ISO8601ConversionOptions &options=ISO8601ConversionOptions())
 
static String CurrentUTCISO8601DateTime (const ISO8601ConversionOptions &options=ISO8601ConversionOptions())
 
static String Random (size_type n, RandomizationOptions options=RandomizationOption::Default)
 
static String ToISO8601DateTime (int year, int month, int day, double dayf, double tz=0, const ISO8601ConversionOptions &options=ISO8601ConversionOptions())
 
static String ToSexagesimal (double d, const SexagesimalConversionOptions &options=SexagesimalConversionOptions())
 
static String ToSexagesimal (int sign, double s1, double s2, double s3, const SexagesimalConversionOptions &options=SexagesimalConversionOptions())
 
static Array< uint32UTF16ToUTF32 (const_c_string string, size_type i=0, size_type n=maxPos)
 
static IsoString UTF16ToUTF8 (const_c_string string, size_type i=0, size_type n=maxPos)
 
static String UTF32ToUTF16 (const uint32 *string, size_type i=0, size_type n=maxPos)
 
static String UTF8ToUTF16 (const_c_string8 string, size_type i=0, size_type n=maxPos)
 
static String UUID ()
 
- Static Public Member Functions inherited from pcl::GenericString< char16_type, CharTraits, PCL_STRING_ALLOCATOR >
static size_type BytesPerChar () noexcept
 
static size_type DeleteFreeList ()
 

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
 

Detailed Description

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.

See also
IsoString

Definition at line 8112 of file String.h.

Member Typedef Documentation

◆ allocator

The allocator class used by this template instantiation.

Definition at line 8139 of file String.h.

◆ block_allocator

The block allocator used by this template instantiation.

Definition at line 8134 of file String.h.

◆ c_string

Null-terminated sequence of UTF-16 characters.

Definition at line 8144 of file String.h.

◆ c_string8

Null-terminated sequence of 8-bit characters.

Definition at line 8203 of file String.h.

◆ char8_iterator

8-bit string iterator.

Definition at line 8213 of file String.h.

◆ char8_traits

8-bit character traits class.

Definition at line 8198 of file String.h.

◆ char8_type

Represents an 8-bit character (ISO/IEC-8859-1, ASCII or UTF-8).

Definition at line 8193 of file String.h.

◆ char_traits

The character traits class used by this template instantiation.

Definition at line 8129 of file String.h.

◆ char_type

Represents a character pertaining to a String object.

Definition at line 8124 of file String.h.

◆ const_c_string

Immutable null-terminated sequence of UTF-16 characters.

Definition at line 8149 of file String.h.

◆ const_c_string8

Immutable null-terminated sequence of 8-bit characters.

Definition at line 8208 of file String.h.

◆ const_char8_iterator

Immutable 8-bit string iterator.

Definition at line 8218 of file String.h.

◆ const_iterator

Immutable String iterator.

Definition at line 8169 of file String.h.

◆ const_reverse_iterator

Immutable reverse String iterator.

Definition at line 8179 of file String.h.

◆ iterator

String iterator.

Definition at line 8164 of file String.h.

◆ reverse_iterator

Reverse String iterator.

Definition at line 8174 of file String.h.

◆ string8_base

using pcl::String::string8_base = GenericString<char, IsoCharTraits, PCL_STRING_ALLOCATOR>

Represents an 8-bit string. Depending on the context, this type represents a sequence of ISO/IEC-8859-1, ASCII, or UTF-8 code points.

Note
This type must be defined as the same template instantiation used for the IsoString class.

Definition at line 8188 of file String.h.

◆ string_base

Base class of String.

Definition at line 8119 of file String.h.

Constructor & Destructor Documentation

◆ String() [1/37]

pcl::String::String ( )
default

Constructs an empty String object.

◆ String() [2/37]

pcl::String::String ( const string_base s)
inline

Constructs a String object as a copy of the specified string_base string s (copy constructor from the base class).

Definition at line 8231 of file String.h.

◆ String() [3/37]

pcl::String::String ( const String )
default

Copy constructor.

◆ String() [4/37]

pcl::String::String ( string_base &&  s)
inline

Constructs a String object by transferring data from the specified string_base string s (move constructor from the base class).

Definition at line 8245 of file String.h.

◆ String() [5/37]

pcl::String::String ( String &&  )
default

Move constructor.

◆ String() [6/37]

pcl::String::String ( const string8_base s)
inline

Constructs a String as a transformed copy of the specified 8-bit, ISO/IEC-8859-1 string s.

Definition at line 8259 of file String.h.

◆ String() [7/37]

pcl::String::String ( const_iterator  t)
inline

Constructs a String as a copy of a null-terminated string t.

Definition at line 8267 of file String.h.

◆ String() [8/37]

pcl::String::String ( const_iterator  t,
size_type  i,
size_type  n 
)
inline

Constructs a String with the n first characters of the null-terminated string t, starting from its i-th character.

Definition at line 8276 of file String.h.

◆ String() [9/37]

pcl::String::String ( char_type  c,
size_type  n 
)
inline

Constructs a String with n copies of a UTF-16 character c.

Definition at line 8284 of file String.h.

◆ String() [10/37]

pcl::String::String ( const_iterator  i,
const_iterator  j 
)
inline

Constructs a String with a copy of the character sequence defined by the range [i,j).

Definition at line 8293 of file String.h.

◆ String() [11/37]

pcl::String::String ( std::initializer_list< char_type l)
inline

Constructs a String with a copy of the character sequence stored in the specified initializer list l.

This constructor is equivalent to:

String( l.begin(), l.end() )

Definition at line 8306 of file String.h.

◆ String() [12/37]

pcl::String::String ( const char16_t *  t)
inline

Constructs a String as a copy of a null-terminated string t of char16_t characters.

Definition at line 8315 of file String.h.

◆ String() [13/37]

pcl::String::String ( const char16_t *  t,
size_type  i,
size_type  n 
)
inline

Constructs a String with the n first characters of the null-terminated string t of char16_t characters, starting from its i-th character.

Definition at line 8325 of file String.h.

◆ String() [14/37]

pcl::String::String ( char16_t  c,
size_type  n 
)
inline

Constructs a String with n copies of a char16_t character c.

Definition at line 8333 of file String.h.

◆ String() [15/37]

pcl::String::String ( const wchar_t *  t)
inline

Constructs a String as a copy of a null-terminated string t of wchar_t characters.

Definition at line 8342 of file String.h.

◆ String() [16/37]

pcl::String::String ( const wchar_t *  t,
size_type  i,
size_type  n 
)
inline

Constructs a String with the n first characters of the null-terminated string t of wchar_t characters, starting from its i-th character.

Definition at line 8352 of file String.h.

◆ String() [17/37]

pcl::String::String ( wchar_t  c,
size_type  n 
)
inline

Constructs a String with n copies of a wchar_t character c.

Definition at line 8360 of file String.h.

◆ String() [18/37]

pcl::String::String ( const_c_string8  t)
inline

Constructs a String as a transformed copy of the null-terminated 8-bit, ISO/IEC-8859-1 string t.

Definition at line 8369 of file String.h.

◆ String() [19/37]

pcl::String::String ( const_c_string8  t,
size_type  i,
size_type  n 
)
inline

Constructs a String with the n first characters of the null-terminated, 8-bit ISO/IEC-8859-1 string t, starting from its i-th character.

Definition at line 8379 of file String.h.

◆ String() [20/37]

pcl::String::String ( const_char8_iterator  i,
const_char8_iterator  j 
)
inline

Constructs a String with the sequence of 8-bit characters in the range [i,j) of 8-bit string iterators.

Definition at line 8388 of file String.h.

◆ String() [21/37]

pcl::String::String ( std::initializer_list< char8_type l)
inline

Constructs a String with a copy of the 8-bit ISO/IEC-8859-1 character sequence stored in the specified initializer list l.

This constructor is equivalent to:

String( l.begin(), l.end() )

Definition at line 8401 of file String.h.

◆ String() [22/37]

pcl::String::String ( char8_type  c,
size_type  n = 1 
)
inline

Constructs a String object with n copies of an ISO/IEC-8859-1 character c.

Definition at line 8410 of file String.h.

◆ String() [23/37]

pcl::String::String ( bool  x)
inlineexplicit

Constructs a String as a literal representation of a bool value.

Definition at line 8419 of file String.h.

◆ String() [24/37]

pcl::String::String ( short  x)
inlineexplicit

Constructs a String as a literal representation of a signed short value.

Definition at line 8429 of file String.h.

◆ String() [25/37]

pcl::String::String ( unsigned short  x)
inlineexplicit

Constructs a String as a literal representation of an unsigned short value.

Definition at line 8439 of file String.h.

◆ String() [26/37]

pcl::String::String ( int  x)
inlineexplicit

Constructs a String as a literal representation of a signed int value.

Definition at line 8449 of file String.h.

◆ String() [27/37]

pcl::String::String ( unsigned int  x)
inlineexplicit

Constructs a String as a literal representation of an unsigned int value.

Definition at line 8459 of file String.h.

◆ String() [28/37]

pcl::String::String ( long  x)
inlineexplicit

Constructs a String as a literal representation of a signed long value.

Definition at line 8469 of file String.h.

◆ String() [29/37]

pcl::String::String ( unsigned long  x)
inlineexplicit

Constructs a String as a literal representation of an unsigned long value.

Definition at line 8479 of file String.h.

◆ String() [30/37]

pcl::String::String ( long long  x)
inlineexplicit

Constructs a String as a literal representation of a signed long long value.

Definition at line 8489 of file String.h.

◆ String() [31/37]

pcl::String::String ( unsigned long long  x)
inlineexplicit

Constructs a String as a literal representation of an unsigned long long value.

Definition at line 8499 of file String.h.

◆ String() [32/37]

pcl::String::String ( float  x)
inlineexplicit

Constructs a String as a literal representation of a float value.

Definition at line 8509 of file String.h.

◆ String() [33/37]

pcl::String::String ( double  x)
inlineexplicit

Constructs a String as a literal representation of a double value.

Definition at line 8519 of file String.h.

◆ String() [34/37]

pcl::String::String ( long double  x)
inlineexplicit

Constructs a String as a literal representation of a long double value.

Definition at line 8529 of file String.h.

◆ String() [35/37]

pcl::String::String ( Complex< float > &  x)
inlineexplicit

Constructs a String as a literal representation of an fcomplex value.

Definition at line 8544 of file String.h.

◆ String() [36/37]

pcl::String::String ( Complex< double > &  x)
inlineexplicit

Constructs a String as a literal representation of a dcomplex value.

Definition at line 8553 of file String.h.

◆ String() [37/37]

pcl::String::String ( Complex< long double > &  x)
inlineexplicit

Constructs a String as a literal representation of an lcomplex value.

Definition at line 8562 of file String.h.

Member Function Documentation

◆ AppendFormat() [1/2]

String& pcl::String::AppendFormat ( const wchar_t *  fmt,
  ... 
)
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.

Definition at line 11189 of file String.h.

◆ AppendFormat() [2/2]

String& pcl::String::AppendFormat ( const_c_string8  fmt,
  ... 
)
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().

◆ AppendVFormat() [1/2]

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.

◆ AppendVFormat() [2/2]

int pcl::String::AppendVFormat ( const_c_string8  fmt,
va_list  paramList 
)
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().

◆ Assign() [1/19]

void pcl::String::Assign ( char16_t  c,
size_type  n = 1 
)
inline

Assigns n copies of a char16_t character c to this string.

Definition at line 8836 of file String.h.

◆ Assign() [2/19]

void pcl::String::Assign ( char8_type  c,
size_type  n = 1 
)
inline

Assigns n copies of an ISO/IEC-8859-1 character c to this string.

Definition at line 8950 of file String.h.

◆ Assign() [3/19]

void pcl::String::Assign ( char_type  c,
size_type  n = 1 
)
inline

Assigns n copies of a character c to this string.

Definition at line 8810 of file String.h.

◆ Assign() [4/19]

void pcl::String::Assign ( const char16_t *  t)
inline

Assigns a null-terminated string t of char16_t to this string.

Definition at line 8818 of file String.h.

◆ Assign() [5/19]

void pcl::String::Assign ( const char16_t *  t,
size_type  i,
size_type  n 
)
inline

Assigns a contiguous segment of n characters of a null-terminated string t of char16_t, starting from its i-th character, to this string.

Definition at line 8828 of file String.h.

◆ Assign() [6/19]

void pcl::String::Assign ( const String s)
inline

Assigns a string s to this string.

Definition at line 8755 of file String.h.

◆ Assign() [7/19]

void pcl::String::Assign ( const String s,
size_type  i,
size_type  n 
)
inline

Assigns a contiguous segment of n characters of a string s, starting from its i-th character, to this string.

Definition at line 8764 of file String.h.

◆ Assign() [8/19]

void pcl::String::Assign ( const string8_base s)
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().

◆ Assign() [9/19]

void pcl::String::Assign ( const wchar_t *  t)

Assigns a null-terminated string t of wchar_t to this string.

◆ Assign() [10/19]

void pcl::String::Assign ( const wchar_t *  t,
size_type  i,
size_type  n 
)

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.

◆ Assign() [11/19]

void pcl::String::Assign ( const_c_string8  t)
inline

Assigns a null-terminated 8-bit ISO/IEC-8859-1 string t to this object.

Definition at line 8883 of file String.h.

◆ Assign() [12/19]

void pcl::String::Assign ( const_c_string8  t,
size_type  i,
size_type  n 
)
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().

◆ Assign() [13/19]

void pcl::String::Assign ( const_char8_iterator  p,
const_char8_iterator  q 
)
inline

Assigns a contiguous sequence of 8-bit ISO/IEC-8859-1 characters in the range [i,j) to this string, replacing its previous contents.

Definition at line 8922 of file String.h.

◆ Assign() [14/19]

void pcl::String::Assign ( const_iterator  i,
const_iterator  j 
)
inline

Assigns a sequence of characters defined by the range [i,j) to this string.

Definition at line 8781 of file String.h.

◆ Assign() [15/19]

void pcl::String::Assign ( const_iterator  t)
inline

Assigns a null-terminated string t to this string.

Definition at line 8772 of file String.h.

◆ Assign() [16/19]

void pcl::String::Assign ( const_iterator  t,
size_type  i,
size_type  n 
)
inline

Assigns a contiguous segment of at most n characters of a null-terminated sequence t, starting from its i-th character, to this string.

Definition at line 8802 of file String.h.

◆ Assign() [17/19]

void pcl::String::Assign ( std::initializer_list< char8_type l)
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:

Assign( l.begin(), l.end() )

Definition at line 8942 of file String.h.

◆ Assign() [18/19]

void pcl::String::Assign ( std::initializer_list< char_type l)
inline

Assigns a sequence of characters defined by the specified initializer list l to this string. This function is equivalent to:

Assign( l.begin(), l.end() )

Definition at line 8792 of file String.h.

◆ Assign() [19/19]

void pcl::String::Assign ( wchar_t  c,
size_type  n = 1 
)
inline

Assigns n copies of a wchar_t character c to this string.

Definition at line 8856 of file String.h.

◆ CurrentLocalISO8601DateTime()

static String pcl::String::CurrentLocalISO8601DateTime ( const ISO8601ConversionOptions options = ISO8601ConversionOptions())
static

Returns an ASCII representation of the current local date and time in ISO 8601 extended format.

Parameters
optionsOptional settings to control the representation of date and time in ISO 8601 format.
See also
CurrentUTCISO8601DateTime(), ToISO8601DateTime(), ISO8601ConversionOptions

◆ CurrentUTCISO8601DateTime()

static String pcl::String::CurrentUTCISO8601DateTime ( const ISO8601ConversionOptions options = ISO8601ConversionOptions())
static

Returns an ASCII representation of the current UTC date and time in ISO 8601 extended format.

Parameters
optionsOptional settings to control the representation of date and time in ISO 8601 format.
See also
CurrentLocalISO8601DateTime(), ToISO8601DateTime(), ISO8601ConversionOptions, TimePoint::Now()

◆ DecodedHTMLSpecialChars()

String pcl::String::DecodedHTMLSpecialChars ( ) const
inline

Returns a duplicate of this string with all occurrences of special HTML entities replaced with their corresponding plain text character equivalents.

See also
ToDecodedHTMLSpecialChars(), EncodedHTMLSpecialChars()

Definition at line 11044 of file String.h.

◆ EncodedHTMLSpecialChars()

String pcl::String::EncodedHTMLSpecialChars ( ) const
inline

Returns a duplicate of this string with all occurrences of HTML special characters replaced with valid HTML entities.

See also
ToEncodedHTMLSpecialChars(), DecodedHTMLSpecialChars()

Definition at line 11014 of file String.h.

◆ Format() [1/2]

String& pcl::String::Format ( const wchar_t *  fmt,
  ... 
)
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.

Definition at line 11166 of file String.h.

◆ Format() [2/2]

String& pcl::String::Format ( const_c_string8  fmt,
  ... 
)
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.

Definition at line 11081 of file String.h.

◆ operator=() [1/13]

String& pcl::String::operator= ( char16_t  c)
inline

Assigns a single copy of a char16_t character c to this string. Returns a reference to this object.

Definition at line 8679 of file String.h.

◆ operator=() [2/13]

String& pcl::String::operator= ( char8_type  c)
inline

Assigns a single copy of an ISO/IEC-8859-1 character c to this string. Returns a reference to this object.

Definition at line 8719 of file String.h.

◆ operator=() [3/13]

String& pcl::String::operator= ( char_type  c)
inline

Assigns a single copy of a character c to this string. Returns a reference to this object.

Definition at line 8659 of file String.h.

◆ operator=() [4/13]

String& pcl::String::operator= ( const char16_t *  t)
inline

Assigns a copy of the null-terminated string t of char16_t to this string. Returns a reference to this object.

Definition at line 8669 of file String.h.

◆ operator=() [5/13]

String& pcl::String::operator= ( const String s)
inline

Copy assignment operator. Returns a reference to this object.

Definition at line 8600 of file String.h.

◆ operator=() [6/13]

String& pcl::String::operator= ( const string8_base s)
inline

Assigns a copy of the 8-bit ISO/IEC-8859-1 string s to this string. Returns a reference to this object.

Definition at line 8639 of file String.h.

◆ operator=() [7/13]

String& pcl::String::operator= ( const string_base s)
inline

Assigns a shallow copy of the string_base string s to this string. Returns a reference to this object.

Definition at line 8619 of file String.h.

◆ operator=() [8/13]

String& pcl::String::operator= ( const wchar_t *  t)
inline

Assigns a copy of the null-terminated string t of wchar_t to this string. Returns a reference to this object.

Definition at line 8689 of file String.h.

◆ operator=() [9/13]

String& pcl::String::operator= ( const_c_string8  t)
inline

Assigns a copy of the null-terminated 8-bit ISO/IEC-8859-1 string t to this string. Returns a reference to this object.

Definition at line 8709 of file String.h.

◆ operator=() [10/13]

String& pcl::String::operator= ( const_iterator  t)
inline

Assigns a copy of the null-terminated string t to this string. Returns a reference to this object.

Definition at line 8649 of file String.h.

◆ operator=() [11/13]

String& pcl::String::operator= ( String &&  s)
inline

Move assignment operator. Returns a reference to this object.

Definition at line 8609 of file String.h.

◆ operator=() [12/13]

String& pcl::String::operator= ( string_base &&  s)
inline

Transfers the data from the string_base string s to this string (move assignment from base class). Returns a reference to this object.

Definition at line 8629 of file String.h.

◆ operator=() [13/13]

String& pcl::String::operator= ( wchar_t  c)
inline

Assigns a single copy of a wchar_t character c to this string. Returns a reference to this object.

Definition at line 8699 of file String.h.

◆ ParseISO8601DateTime()

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.

Parameters
yearOn output, the year of the date.
monthOn output, the month of the date in the range [1,12].
dayOn output, the day of the date in the range [1,31].
dayfOn output, the day fraction corresponding to the time specification, in the range [0,1).
tzOn 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)).

See also
TryParseISO8601DateTime(), TimePoint::FromString()

Referenced by pcl::TimePoint::FromString(), and pcl::TimePoint::TimePoint().

◆ ParseListOfDouble()

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.

Parameters
separatorThe 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 ','.
maxCountThe 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.

◆ ParseListOfDoubleAsVector()

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.

◆ ParseListOfFloat()

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.

Parameters
separatorThe 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 ','.
maxCountThe 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.

◆ ParseListOfFloatAsVector()

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.

◆ Random()

static String pcl::String::Random ( size_type  n,
RandomizationOptions  options = RandomizationOption::Default 
)
static

Generates a string of n random 16-bit code points, with character types and ranges as prescribed by the specified options.

See also
RandomizationOption

◆ To7BitASCII()

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 (?).

See also
ToIsoString(), ToUTF8(), ToMBS(), ToUTF32()

◆ ToBool()

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.

See also
TryToBool()

◆ ToColonSeparated()

template<class C >
String& pcl::String::ToColonSeparated ( const C &  c)
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:

ToSeparated( c, char16_type( ':' ) );

Definition at line 10911 of file String.h.

◆ ToCommaSeparated()

template<class C >
String& pcl::String::ToCommaSeparated ( const C &  c)
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:

ToSeparated( c, char16_type( ',' ) );

Definition at line 10896 of file String.h.

◆ ToDecodedHTMLSpecialChars()

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:

"\&amp;" (ampersand) becomes '&'
"\&quot;" (double quote) becomes '"'
"\&#039;" (single quote) becomes "'"
"\&apos;" (apostrophe) becomes "'"
"\&lt;" (less than) becomes '<'
"\&gt;" (greater than) becomes '>'

See also
DecodedHTMLSpecialChars(), ToEncodedHTMLSpecialChars()

◆ ToDouble()

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.

See also
TryToDouble()

◆ ToEncodedHTMLSpecialChars()

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 "\&amp;"
'"' (double quote) becomes "\&quot;"
"'" (single quote) becomes "\&#039;"
'<' (less than) becomes "\&lt;"
'>' (greater than) becomes "\&gt;"

See also
EncodedHTMLSpecialChars(), ToDecodedHTMLSpecialChars()

◆ ToFloat()

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.

See also
TryToFloat()

◆ ToHyphenated()

template<class C >
String& pcl::String::ToHyphenated ( const C &  c)
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:

ToSeparated( c, char16_type( '-' ) );

Definition at line 10985 of file String.h.

◆ ToInt() [1/2]

long pcl::String::ToInt ( ) const
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:

long n = s.ToInt( 0 );

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.

See also
TryToInt()

Definition at line 11537 of file String.h.

◆ ToInt() [2/2]

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.

See also
TryToInt( int&, int ) const

◆ ToInt64() [1/2]

long long pcl::String::ToInt64 ( ) const
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:

long long n = s.ToInt64( 0 );

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.

See also
TryToInt64()

Definition at line 11718 of file String.h.

◆ ToInt64() [2/2]

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.

See also
TryToInt64( long long&, int ) const

◆ ToISO8601DateTime()

static String pcl::String::ToISO8601DateTime ( int  year,
int  month,
int  day,
double  dayf,
double  tz = 0,
const ISO8601ConversionOptions options = ISO8601ConversionOptions() 
)
static

Returns a string representation of a date and time in ISO 8601 extended format.

Parameters
yearThe year of the date.
monthThe month of the date in the range [1,12].
dayThe day of the date in the range [1,31].
dayfThe day fraction corresponding to the time specification, in the range [0,1).
tzThe time zone offset in hours, in the range [-12,+12]. The default value is zero, to be interpreted as UTC.
optionsOptional settings to control the representation of date and time in ISO 8601 format.
See also
CurrentUTCISO8601DateTime(), CurrentLocalISO8601DateTime(), ParseISO8601DateTime(), ISO8601ConversionOptions, TimePoint::ToString()

◆ ToIsoString()

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 (?).

See also
ToUTF8(), ToMBS(), ToUTF32(), To7BitASCII()

◆ ToLocal8Bit()

IsoString pcl::String::ToLocal8Bit ( ) const
inline

Returns a copy of this Unicode string converted to an 8-bit locale-dependent string. On UNIX/Linux systems (FreeBSD, Linux, Mac OS X) this function is equivalent to ToUTF8(). On Windows, this function returns ToMBS().

See also
ToUTF8(), ToMBS();

Definition at line 11337 of file String.h.

◆ ToMBS()

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.

See also
ToUTF8(), ToLocal8Bit(), ToIsoString(), ToUTF32();

◆ ToNewLineSeparated()

template<class C >
String& pcl::String::ToNewLineSeparated ( const C &  c)
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:

ToSeparated( c, char16_type( '\n' ) );

Definition at line 10956 of file String.h.

◆ ToNullSeparated()

template<class C >
String& pcl::String::ToNullSeparated ( const C &  c)
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:

ToSeparated( c, char16_type( '\0' ) );

Definition at line 10971 of file String.h.

◆ ToSeparated() [1/8]

template<class C >
String& pcl::String::ToSeparated ( const C &  c,
char_type  separator 
)
inline

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.

Definition at line 10743 of file String.h.

◆ ToSeparated() [2/8]

template<class C , class AF >
String& pcl::String::ToSeparated ( const C &  c,
char_type  separator,
AF  append 
)
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:

void append( String& s, char16_type c );

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.

Definition at line 10766 of file String.h.

◆ ToSeparated() [3/8]

template<class C >
String& pcl::String::ToSeparated ( const C &  c,
const String separator 
)
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.

Definition at line 10782 of file String.h.

◆ ToSeparated() [4/8]

template<class C , class AF >
String& pcl::String::ToSeparated ( const C &  c,
const String separator,
AF  append 
)
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:

void append( String& s1, const String& s2 );

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.

Definition at line 10805 of file String.h.

◆ ToSeparated() [5/8]

template<class C >
String& pcl::String::ToSeparated ( const C &  c,
const_c_string  separator 
)
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.

Definition at line 10821 of file String.h.

◆ ToSeparated() [6/8]

template<class C , class AF >
String& pcl::String::ToSeparated ( const C &  c,
const_c_string  separator,
AF  append 
)
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:

void append( String& s1, const char16_type* s2 );

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.

Definition at line 10843 of file String.h.

◆ ToSeparated() [7/8]

template<class C >
String& pcl::String::ToSeparated ( const C &  c,
const_c_string8  separator 
)
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.

Definition at line 10859 of file String.h.

◆ ToSeparated() [8/8]

template<class C , class AF >
String& pcl::String::ToSeparated ( const C &  c,
const_c_string8  separator,
AF  append 
)
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:

void append( String& s1, const char* s2 );

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.

Definition at line 10881 of file String.h.

◆ ToSpaceSeparated()

template<class C >
String& pcl::String::ToSpaceSeparated ( const C &  c)
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:

ToSeparated( c, char16_type( ' ' ) );

Definition at line 10926 of file String.h.

◆ ToTabSeparated()

template<class C >
String& pcl::String::ToTabSeparated ( const C &  c)
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:

ToSeparated( c, char16_type( '\t' ) );

Definition at line 10941 of file String.h.

◆ ToUInt() [1/2]

unsigned long pcl::String::ToUInt ( ) const
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:

unsigned long n = s.ToUInt( 0 );

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.

See also
TryToUInt()

Definition at line 11634 of file String.h.

◆ ToUInt() [2/2]

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.

See also
TryToUInt( unsigned&, int ) const

◆ ToUInt64() [1/2]

unsigned long long pcl::String::ToUInt64 ( ) const
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:

unsigned long long n = s.ToUInt64( 0 );

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.

See also
TryToUInt64()

Definition at line 11801 of file String.h.

◆ ToUInt64() [2/2]

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.

See also
TryToUInt64( unsigned long long&, int ) const

◆ ToUTF32()

Array<uint32> pcl::String::ToUTF32 ( size_type  i = 0,
size_type  n = maxPos 
) const
inline

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.

See also
ToWCharArray(), ToUTF8(), ToMBS(), ToIsoString()

Definition at line 11397 of file String.h.

◆ ToUTF8()

IsoString pcl::String::ToUTF8 ( size_type  i = 0,
size_type  n = maxPos 
) const
inline

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.

See also
ToMBS(), ToLocal8Bit(), ToIsoString(), ToUTF32()

Definition at line 11307 of file String.h.

◆ ToWCharArray()

Array<wchar_t> pcl::String::ToWCharArray ( size_type  i = 0,
size_type  n = maxPos 
) const
inline

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().

See also
ToUTF32(), ToUTF8(), ToMBS(), ToIsoString()

Definition at line 11366 of file String.h.

References pcl::Min().

◆ TryParseISO8601DateTime()

bool pcl::String::TryParseISO8601DateTime ( int &  year,
int &  month,
int &  day,
double &  dayf,
double &  tz 
) const
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.

See also
ParseISO8601DateTime(), TimePoint::TryFromString()

Referenced by pcl::TimePoint::TryFromString().

◆ TryToBool()

bool pcl::String::TryToBool ( bool &  value) const
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.

See also
ToBool()

◆ TryToDouble()

bool pcl::String::TryToDouble ( double &  value) const
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.

See also
ToDouble()

◆ TryToFloat()

bool pcl::String::TryToFloat ( float &  value) const
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.

See also
ToFloat()

◆ TryToInt() [1/2]

bool pcl::String::TryToInt ( int &  value) const
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:

int v;
if ( s.TryToInt( v, 0 ) ) ...

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.

See also
ToInt()

Definition at line 11565 of file String.h.

◆ TryToInt() [2/2]

bool pcl::String::TryToInt ( int &  value,
int  base 
) const
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.

See also
ToInt( int ) const

◆ TryToInt64() [1/2]

bool pcl::String::TryToInt64 ( long long &  value) const
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:

long long v;
if ( s.TryToInt64( v, 0 ) ) ...

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.

See also
ToInt64()

Definition at line 11747 of file String.h.

◆ TryToInt64() [2/2]

bool pcl::String::TryToInt64 ( long long &  value,
int  base 
) const
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.

See also
ToInt64( int ) const

◆ TryToUInt() [1/2]

bool pcl::String::TryToUInt ( unsigned &  value) const
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:

unsigned v;
if ( s.TryToUInt( v, 0 ) ) ...

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.

See also
ToUInt()

Definition at line 11662 of file String.h.

◆ TryToUInt() [2/2]

bool pcl::String::TryToUInt ( unsigned &  value,
int  base 
) const
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.

See also
ToUInt( int ) const

◆ TryToUInt64() [1/2]

bool pcl::String::TryToUInt64 ( unsigned long long &  value) const
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:

unsigned long long v;
if ( s.TryToUInt64( v, 0 ) ) ...

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.

See also
ToUInt64()

Definition at line 11830 of file String.h.

◆ TryToUInt64() [2/2]

bool pcl::String::TryToUInt64 ( unsigned long long &  value,
int  base 
) const
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.

See also
ToUInt64( int ) const

◆ UTF16ToUTF32()

static Array<uint32> pcl::String::UTF16ToUTF32 ( const_c_string  string,
size_type  i = 0,
size_type  n = maxPos 
)
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.

See also
UTF8ToUTF16(), UTF16ToUTF8(), UTF32ToUTF16()

◆ UTF16ToUTF8()

static IsoString pcl::String::UTF16ToUTF8 ( const_c_string  string,
size_type  i = 0,
size_type  n = maxPos 
)
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.

See also
UTF8ToUTF16(), UTF16ToUTF32(), UTF32ToUTF16()

◆ UTF32ToUTF16()

static String pcl::String::UTF32ToUTF16 ( const uint32 string,
size_type  i = 0,
size_type  n = maxPos 
)
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.

See also
UTF8ToUTF16(), UTF16ToUTF8(), UTF16ToUTF32()

◆ UTF8ToUTF16()

static String pcl::String::UTF8ToUTF16 ( const_c_string8  string,
size_type  i = 0,
size_type  n = maxPos 
)
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.

See also
UTF16ToUTF8(), UTF16ToUTF32(), UTF32ToUTF16()

Referenced by pcl::IsoString::UTF8ToUTF16().

◆ UUID()

static String pcl::String::UUID ( )
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'.

◆ VFormat() [1/2]

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.

◆ VFormat() [2/2]

int pcl::String::VFormat ( const_c_string8  fmt,
va_list  paramList 
)
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().


The documentation for this class was generated from the following file:
pcl::String::Assign
void Assign(const String &s)
Definition: String.h:8755
pcl::String::ToSeparated
String & ToSeparated(const C &c, char_type separator)
Definition: String.h:10743
pcl::String::String
String()=default
pcl::char16_type
uint16 char16_type
Definition: Defs.h:1144