PCL
pcl::GenericString< T, R, A > Class Template Reference

Generic character string. More...

#include <String.h>

+ Inheritance diagram for pcl::GenericString< T, R, A >:

Public Types

typedef pcl::Allocator< T, A > allocator
 
typedef A block_allocator
 
typedef T * c_string
 
typedef R char_traits
 
typedef T char_type
 
typedef const T * const_c_string
 
typedef const T * const_iterator
 
typedef ReverseRandomAccessIterator< const_iterator, const T > const_reverse_iterator
 
typedef T * iterator
 
typedef ReverseRandomAccessIterator< iterator, T > reverse_iterator
 

Public Member Functions

 GenericString ()
 
 GenericString (const GenericString &s)
 
 GenericString (GenericString &&s)
 
 GenericString (const_c_string t)
 
 GenericString (const_iterator i, const_iterator j)
 
 GenericString (std::initializer_list< char_type > l)
 
 GenericString (const_c_string t, size_type i, size_type n)
 
 GenericString (char_type c, size_type n=1)
 
 ~GenericString ()
 
template<class R1 , class A1 >
void Add (const GenericString< T, R1, A1 > &s)
 
void Add (const_iterator i, const_iterator j)
 
void Add (const_c_string t, size_type n)
 
void Add (const_c_string t)
 
void Add (char_type c, size_type n=1)
 
const allocatorAllocator () const noexcept
 
template<class R1 , class A1 >
void Append (const GenericString< T, R1, A1 > &s)
 
void Append (const_iterator i, const_iterator j)
 
void Append (const_c_string t, size_type n)
 
void Append (const_c_string t)
 
void Append (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_iterator i, const_iterator j)
 
void Assign (std::initializer_list< char_type > l)
 
void Assign (const_c_string t, size_type i, size_type n)
 
void Assign (char_type c, size_type n=1)
 
iterator At (size_type i)
 
const_iterator At (size_type i) const noexcept
 
size_type Available () const noexcept
 
iterator Begin ()
 
const_iterator Begin () const noexcept
 
iterator begin ()
 
const_iterator begin () const noexcept
 
template<class C , class R1 , class A1 >
size_type Break (C &list, const GenericString< T, R1, A1 > &s, bool trim=false, size_type i=0) const
 
template<class C >
size_type Break (C &list, const_c_string s, bool trim=false, size_type i=0) const
 
template<class C >
size_type Break (C &list, char_type c, bool trim=false, size_type i=0) const
 
template<class C , typename S >
size_type Break (C &list, const Array< S > &ca, bool trim=false, size_type i=0) const
 
template<class C , class R1 , class A1 >
size_type BreakIC (C &list, const GenericString< T, R1, A1 > &s, bool trim=false, size_type i=0) const
 
template<class C >
size_type BreakIC (C &list, const_c_string s, bool trim=false, size_type i=0) const
 
template<class C >
size_type BreakIC (C &list, char_type c, 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 ()
 
template<class R1 , class A1 >
int Compare (const GenericString< T, 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 Compare (char_type c, bool caseSensitive=true, bool localeAware=true) const noexcept
 
template<class R1 , class A1 >
int CompareCodePoints (const GenericString< T, R1, A1 > &s, bool caseSensitive=true) const noexcept
 
int CompareCodePoints (const_c_string t, bool caseSensitive=true) const noexcept
 
int CompareCodePoints (char_type c, bool caseSensitive=true) const noexcept
 
template<class R1 , class A1 >
int CompareIC (const GenericString< T, R1, A1 > &s, bool localeAware=true) const noexcept
 
int CompareIC (const_c_string t, bool localeAware=true) const noexcept
 
int CompareIC (char_type c, bool localeAware=true) const noexcept
 
template<class R1 , class A1 >
bool Contains (const GenericString< T, R1, A1 > &s) const noexcept
 
bool Contains (const_c_string t) const noexcept
 
bool Contains (char_type c) const noexcept
 
template<class R1 , class A1 >
bool ContainsIC (const GenericString< T, R1, A1 > &s) const noexcept
 
bool ContainsIC (const_c_string t) const noexcept
 
bool ContainsIC (char_type c) 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)
 
template<class R1 , class A1 >
void DeleteString (const GenericString< T, R1, A1 > &s, size_type i=0)
 
void DeleteString (const_c_string t, size_type i=0)
 
template<class R1 , class A1 >
void DeleteStringIC (const GenericString< T, 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 ()
 
const_iterator End () const noexcept
 
iterator end ()
 
const_iterator end () const noexcept
 
template<class R1 , class A1 >
bool EndsWith (const GenericString< T, R1, A1 > &s) const noexcept
 
bool EndsWith (const_c_string t) const noexcept
 
bool EndsWith (char_type c) const noexcept
 
template<class R1 , class A1 >
bool EndsWithIC (const GenericString< T, R1, A1 > &s) const noexcept
 
bool EndsWithIC (const_c_string t) const noexcept
 
bool EndsWithIC (char_type c) 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)
 
template<class R1 , class A1 >
size_type Find (const GenericString< T, R1, A1 > &s, size_type i=0) const noexcept
 
size_type Find (const_c_string t, size_type i=0) const noexcept
 
size_type Find (char_type c, size_type i=0) const noexcept
 
template<class R1 , class A1 >
size_type FindFirst (const GenericString< T, R1, A1 > &s, size_type i=0) const noexcept
 
size_type FindFirst (const_c_string t, size_type i=0) const noexcept
 
size_type FindFirst (char_type c, size_type i=0) const noexcept
 
template<class R1 , class A1 >
size_type FindFirstIC (const GenericString< T, R1, A1 > &s, size_type i=0) const noexcept
 
size_type FindFirstIC (const_c_string t, size_type i=0) const noexcept
 
size_type FindFirstIC (char_type c, size_type i=0) const noexcept
 
template<class R1 , class A1 >
size_type FindIC (const GenericString< T, R1, A1 > &s, size_type i=0) const noexcept
 
size_type FindIC (const_c_string t, size_type i=0) const noexcept
 
size_type FindIC (char_type c, size_type i=0) const noexcept
 
template<class R1 , class A1 >
size_type FindLast (const GenericString< T, R1, A1 > &s, size_type r=maxPos) const noexcept
 
size_type FindLast (const_c_string t, size_type r=maxPos) const noexcept
 
size_type FindLast (char_type c, size_type r=maxPos) const noexcept
 
template<class R1 , class A1 >
size_type FindLastIC (const GenericString< T, R1, A1 > &s, size_type r=maxPos) const noexcept
 
size_type FindLastIC (const_c_string t, size_type r=maxPos) const noexcept
 
size_type FindLastIC (char_type c, 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
 
template<class R1 , class A1 >
void Insert (size_type i, const GenericString< T, R1, A1 > &s)
 
void Insert (size_type i, const_iterator p, const_iterator q)
 
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, char_type c, size_type n=1)
 
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 (distance_type &pos) const noexcept
 
bool IsValidIdentifier () 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_typeoperator* ()
 
char_type operator* () const noexcept
 
template<class R1 , class A1 >
GenericStringoperator+= (const GenericString< T, R1, A1 > &s)
 
GenericStringoperator+= (const_c_string t)
 
GenericStringoperator+= (char_type c)
 
template<class R1 , class A1 >
GenericStringoperator-= (const GenericString< T, R1, A1 > &s)
 
GenericStringoperator-= (const_c_string t)
 
GenericStringoperator-= (char_type c)
 
GenericStringoperator= (const GenericString &s)
 
GenericStringoperator= (GenericString &&s)
 
GenericStringoperator= (const_c_string t)
 
GenericStringoperator= (char_type c)
 
char_typeoperator[] (size_type i)
 
char_type operator[] (size_type i) const noexcept
 
GenericString Prefix (size_type i) const
 
template<class R1 , class A1 >
void Prepend (const GenericString< T, R1, A1 > &s)
 
void Prepend (const_iterator i, const_iterator j)
 
void Prepend (const_c_string t, size_type n)
 
void Prepend (const_c_string t)
 
void Prepend (char_type c, size_type n=1)
 
c_string Release ()
 
template<class R1 , class A1 >
void Replace (size_type i, size_type n, const GenericString< T, R1, A1 > &s)
 
void Replace (size_type i, size_type n, const_c_string t)
 
void Replace (size_type i, size_type n, char_type c, size_type nc=1)
 
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)
 
template<class R1 , class A1 , class R2 , class A2 >
void ReplaceString (const GenericString< T, R1, A1 > &s1, const GenericString< T, R2, A2 > &s2, size_type i=0)
 
void ReplaceString (const_c_string t1, const_c_string t2, size_type i=0)
 
template<class R1 , class A1 , class R2 , class A2 >
void ReplaceStringIC (const GenericString< T, R1, A1 > &s1, const GenericString< T, 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 ()
 
template<class BP >
void Sort (BP p)
 
GenericString Sorted () const
 
template<class BP >
GenericString Sorted (BP p) const
 
void Squeeze ()
 
GenericString Squeezed () const
 
template<class R1 , class A1 >
bool StartsWith (const GenericString< T, R1, A1 > &s) const noexcept
 
bool StartsWith (const_c_string t) const noexcept
 
bool StartsWith (char_type c) const noexcept
 
template<class R1 , class A1 >
bool StartsWithIC (const GenericString< T, R1, A1 > &s) const noexcept
 
bool StartsWithIC (const_c_string t) const noexcept
 
bool StartsWithIC (char_type c) 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
 
template<class R1 , class A1 >
bool WildMatch (const GenericString< T, R1, A1 > &pattern, bool caseSensitive=true) const noexcept
 
bool WildMatch (const_c_string pattern, bool caseSensitive=true) const noexcept
 
template<class R1 , class A1 >
bool WildMatchIC (const GenericString< T, R1, A1 > &pattern) const noexcept
 
bool WildMatchIC (const_c_string pattern) const noexcept
 

Static Public Member Functions

static size_type BytesPerChar () noexcept
 
static size_type DeleteFreeList ()
 

Static Public Attributes

static const size_type maxPos = ~size_type( 0 )
 
static const size_type notFound = ~size_type( 0 )
 

Detailed Description

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
class pcl::GenericString< T, R, A >

GenericString is a finite, ordered sequence of characters implemented as a reference-counted, dynamic array of objects of type T, whose fundamental behavior is specified by an instantiation type R of GenericCharTraits for the character type T (typically GenericCharTraits, or a derived class such as CharTraits or IsoCharTraits), and where the type A provides dynamic allocation for contiguous sequences of elements of type T (StandardAllocator is used by default).

On the PixInsight platform, all dynamically allocated strings have been implemented as two instantiations of the GenericString template class, namely the String (UTF-16 string) and IsoString (UTF-8 or ISO/IEC-8859-1 string) classes.

See also
String, IsoString, CharTraits, IsoCharTraits

Definition at line 467 of file String.h.

Member Typedef Documentation

◆ allocator

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
typedef pcl::Allocator<T,A> pcl::GenericString< T, R, A >::allocator

The allocator class used by this string class.

Definition at line 489 of file String.h.

◆ block_allocator

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
typedef A pcl::GenericString< T, R, A >::block_allocator

The block allocator used by this string class.

Definition at line 484 of file String.h.

◆ c_string

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
typedef T* pcl::GenericString< T, R, A >::c_string

Null-terminated string of char_type characters.

Definition at line 494 of file String.h.

◆ char_traits

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
typedef R pcl::GenericString< T, R, A >::char_traits

The character traits class used by this string class.

Definition at line 479 of file String.h.

◆ char_type

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
typedef T pcl::GenericString< T, R, A >::char_type

Represents a string character.

Definition at line 474 of file String.h.

◆ const_c_string

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
typedef const T* pcl::GenericString< T, R, A >::const_c_string

Immutable null-terminated string of char_type characters.

Definition at line 499 of file String.h.

◆ const_iterator

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
typedef const T* pcl::GenericString< T, R, A >::const_iterator

Immutable string iterator.

Definition at line 509 of file String.h.

◆ const_reverse_iterator

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
typedef ReverseRandomAccessIterator<const_iterator, const T> pcl::GenericString< T, R, A >::const_reverse_iterator

Reverse immutable string iterator.

Definition at line 521 of file String.h.

◆ iterator

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
typedef T* pcl::GenericString< T, R, A >::iterator

String iterator.

Definition at line 504 of file String.h.

◆ reverse_iterator

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
typedef ReverseRandomAccessIterator<iterator, T> pcl::GenericString< T, R, A >::reverse_iterator

Reverse string iterator.

Definition at line 515 of file String.h.

Constructor & Destructor Documentation

◆ GenericString() [1/8]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
pcl::GenericString< T, R, A >::GenericString ( )
inline

Constructs an empty string.

Definition at line 540 of file String.h.

◆ GenericString() [2/8]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
pcl::GenericString< T, R, A >::GenericString ( const GenericString< T, R, A > &  s)
inline

Copy constructor. Increments the reference counter of the string s.

Definition at line 548 of file String.h.

◆ GenericString() [3/8]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
pcl::GenericString< T, R, A >::GenericString ( GenericString< T, R, A > &&  s)
inline

Move constructor.

Definition at line 557 of file String.h.

◆ GenericString() [4/8]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
pcl::GenericString< T, R, A >::GenericString ( const_c_string  t)
inline

Constructs a string with a copy of the null-terminated character sequence stored in the specified array t.

Definition at line 567 of file String.h.

◆ GenericString() [5/8]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
pcl::GenericString< T, R, A >::GenericString ( const_iterator  i,
const_iterator  j 
)
inline

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

If i is greater than or equal to j, this constructor creates an empty string. Otherwise it will assign the specified sequence of characters.

Important - Note that this constructor is not equivalent to:

GenericString( i, 0, j-i );

because the above call would assign a null-terminated sequence, while this function assigns the specified range unconditionally, even if it contains null characters. Since this constructor does not have to scan for a terminating character, it is potentially more efficient.

Definition at line 596 of file String.h.

◆ GenericString() [6/8]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
pcl::GenericString< T, R, A >::GenericString ( std::initializer_list< char_type l)
inline

Constructs a string and initializes it with characters taken from the specified initializer list l.

This constructor is equivalent to:

GenericString( l.begin(), l.end() )

Definition at line 616 of file String.h.

◆ GenericString() [7/8]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
pcl::GenericString< T, R, A >::GenericString ( const_c_string  t,
size_type  i,
size_type  n 
)
inline

Constructs a string with a copy of at most n characters stored in the null-terminated sequence t, starting from its i-th character.

Definition at line 625 of file String.h.

◆ GenericString() [8/8]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
pcl::GenericString< T, R, A >::GenericString ( char_type  c,
size_type  n = 1 
)
inline

Constructs a string with n copies of a character c.

Definition at line 640 of file String.h.

◆ ~GenericString()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
pcl::GenericString< T, R, A >::~GenericString ( )
inline

Destroys this string. Decrements the reference counter of the string data and, if it becomes unreferenced, it is destroyed and deallocated.

Definition at line 655 of file String.h.

Member Function Documentation

◆ Add() [1/5]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
template<class R1 , class A1 >
void pcl::GenericString< T, R, A >::Add ( const GenericString< T, R1, A1 > &  s)
inline

A synonym for Append( const GenericString& ), provided for compatibility with PCL container classes.

Definition at line 1793 of file String.h.

◆ Add() [2/5]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::Add ( const_iterator  i,
const_iterator  j 
)
inline

A synonym for Append( const_iterator, const_iterator ), provided for compatibility with PCL container classes.

Definition at line 1802 of file String.h.

◆ Add() [3/5]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::Add ( const_c_string  t,
size_type  n 
)
inline

A synonym for Append( const_c_string, size_type ), provided for compatibility with PCL container classes.

Definition at line 1811 of file String.h.

◆ Add() [4/5]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::Add ( const_c_string  t)
inline

A synonym for Append( const_c_string ), provided for compatibility with PCL container classes.

Definition at line 1820 of file String.h.

◆ Add() [5/5]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::Add ( char_type  c,
size_type  n = 1 
)
inline

A synonym for Append( char_type, size_type ), provided for compatibility with PCL container classes.

Definition at line 1829 of file String.h.

◆ Allocator()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
const allocator& pcl::GenericString< T, R, A >::Allocator ( ) const
inlinenoexcept

Returns a reference to the (immutable) allocator object in this string.

See also
SetAllocator()

Definition at line 832 of file String.h.

◆ Append() [1/5]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
template<class R1 , class A1 >
void pcl::GenericString< T, R, A >::Append ( const GenericString< T, R1, A1 > &  s)
inline

Appends a copy of the specified string s to this string.

Definition at line 1725 of file String.h.

Referenced by pcl::operator+(), pcl::operator<<(), and pcl::IsoString::UTF8ToUTF16().

◆ Append() [2/5]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::Append ( const_iterator  i,
const_iterator  j 
)
inline

Appends a copy of the character sequence defined by the range [i,j) to this string.

If i is greater than or equal to j, calling this member function has no effect.

Definition at line 1748 of file String.h.

◆ Append() [3/5]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::Append ( const_c_string  t,
size_type  n 
)
inline

Appends a copy of the first n characters of a null-terminated character sequence t to this string.

Definition at line 1757 of file String.h.

◆ Append() [4/5]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::Append ( const_c_string  t)
inline

Appends a copy of a null-terminated character sequence to this string.

Definition at line 1765 of file String.h.

◆ Append() [5/5]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::Append ( char_type  c,
size_type  n = 1 
)
inline

Appends n copies of a character c to this string.

Definition at line 1783 of file String.h.

◆ Assign() [1/7]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::Assign ( const GenericString< T, R, A > &  s)
inline

Assigns a string s to this string.

If this instance and the specified source instance s reference different string data, then the data previously referenced by this object is dereferenced. If the previous data becomes unreferenced, it is destroyed and deallocated. Then the data being referenced by s is also referenced by this object.

If this instance and the specified source instance s already reference the same string data, then this function does nothing.

See also
Transfer()

Definition at line 1158 of file String.h.

◆ Assign() [2/7]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::Assign ( const GenericString< T, R, A > &  s,
size_type  i,
size_type  n 
)
inline

Assigns a substring of at most n characters from a source string s, starting from its i-th character, to this string.

Definition at line 1232 of file String.h.

◆ Assign() [3/7]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::Assign ( const_c_string  t)
inline

Assigns a copy of the null-terminated character sequence stored in the specified array t to this string.

If t is a pointer to the contents of this string (or, equivalently, an iterator on this string), this function invokes undefined behavior.

Definition at line 1244 of file String.h.

◆ Assign() [4/7]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::Assign ( const_iterator  i,
const_iterator  j 
)
inline

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

If i is greater than or equal to j, this function empties the string by calling Clear(). Otherwise this function will assign the specified sequence of characters.

If i and/or j are iterators on this string, this function invokes undefined behavior.

Important - Note that this function is not equivalent to:

Assign( i, 0, j-i );

because the above call would assign a null-terminated sequence, while this function assigns the specified range unconditionally, even if it contains null characters. Since this function does not have to scan for a terminating character, it is potentially much more efficient.

Definition at line 1276 of file String.h.

◆ Assign() [5/7]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::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 1294 of file String.h.

◆ Assign() [6/7]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::Assign ( const_c_string  t,
size_type  i,
size_type  n 
)
inline

Assigns a copy of at most n characters stored in the null-terminated sequence t, starting from its i-th character, to this string.

If t is the null pointer, or i is greater than the length of t, or n is zero, this function empties the string by calling Clear().

If t is a pointer to the contents of this string (or, equivalently, an iterator on this string), this function invokes undefined behavior.

The character count n will be constrained to copy existing characters from the null-terminated source sequence.

Definition at line 1312 of file String.h.

◆ Assign() [7/7]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::Assign ( char_type  c,
size_type  n = 1 
)
inline

Assigns n copies of the specified character c to this string. If either c is the null character or n is zero, this function empties the string by calling Clear().

Definition at line 1329 of file String.h.

◆ At() [1/2]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
iterator pcl::GenericString< T, R, A >::At ( size_type  i)
inline

Returns an iterator located at the i-th character of this string. The character index i must be in the range [0,Length()).

If this string is not unique, it is made unique before returning from this member function.

If this string is empty, or if the specified index i is out of range, calling this member function is an error that leads to an invalid result.

See also
operator []( size_type )

Definition at line 864 of file String.h.

◆ At() [2/2]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
const_iterator pcl::GenericString< T, R, A >::At ( size_type  i) const
inlinenoexcept

Returns an immutable iterator located at the i-th character in this string. The character index i must be in the range [0,Length()).

If this string is empty, or if the specified index i is out of range, calling this member function is an error that leads to an invalid result.

See also
operator []( size_type ) const

Definition at line 880 of file String.h.

◆ Available()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
size_type pcl::GenericString< T, R, A >::Available ( ) const
inlinenoexcept

Returns the number of characters available in this string.

The number of available characters is equal to Capacity() - Length().

See also
Capacity(), Length(), Size()

Definition at line 762 of file String.h.

◆ Begin() [1/2]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
iterator pcl::GenericString< T, R, A >::Begin ( )
inline

Returns a mutable iterator pointing to the first character of this string.

If this string is not unique, it is made unique before returning from this member function.

If this string is empty, this member function returns nullptr.

See also
End()

Definition at line 953 of file String.h.

Referenced by pcl::AES256::AES256(), pcl::String::Assign(), pcl::XML::IsValidName(), pcl::IsoString::operator=(), pcl::File::OutText(), pcl::XML::ReferenceValue(), pcl::IsoString::ToString(), and pcl::File::Write().

◆ Begin() [2/2]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
const_iterator pcl::GenericString< T, R, A >::Begin ( ) const
inlinenoexcept

Returns an immutable iterator pointing to the first character of this string.

If this string is empty, this member function returns nullptr.

See also
End() const

Definition at line 967 of file String.h.

◆ begin() [1/2]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
iterator pcl::GenericString< T, R, A >::begin ( )
inline

STL-compatible iteration. Equivalent to Begin().

Definition at line 1090 of file String.h.

◆ begin() [2/2]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
const_iterator pcl::GenericString< T, R, A >::begin ( ) const
inlinenoexcept

STL-compatible iteration. Equivalent to Begin() const.

Definition at line 1098 of file String.h.

◆ Break() [1/4]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
template<class C , class R1 , class A1 >
size_type pcl::GenericString< T, R, A >::Break ( C &  list,
const GenericString< T, R1, A1 > &  s,
bool  trim = false,
size_type  i = 0 
) const
inline

Gets a sequence of tokens (substrings) extracted from this string.

Parameters
[out]listThe list of extracted tokens. Must be a reference to a container, such as Array or List, or a derived class. Typically, this parameter is a reference to a StringList.
sThe token separator string.
trimTrue to trim the extracted tokens. If this parameter is true, existing leading and trailing whitespace characters will be removed from each extracted token.
iStarting character index.

Returns the number of tokens extracted and added to the list.

Definition at line 2357 of file String.h.

◆ Break() [2/4]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
template<class C >
size_type pcl::GenericString< T, R, A >::Break ( C &  list,
const_c_string  s,
bool  trim = false,
size_type  i = 0 
) const
inline

Gets a sequence of tokens (substrings) extracted from this string.

Parameters
[out]listThe list of extracted tokens. Must be a reference to a container, such as Array or List, or a derived class. Typically, this parameter is a reference to a StringList.
sThe token separator null-terminated string.
trimTrue to trim the extracted tokens. If this parameter is true, existing leading and trailing whitespace characters will be removed from each extracted token.
iStarting character index.

Returns the number of tokens extracted and added to the list.

Definition at line 2417 of file String.h.

◆ Break() [3/4]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
template<class C >
size_type pcl::GenericString< T, R, A >::Break ( C &  list,
char_type  c,
bool  trim = false,
size_type  i = 0 
) const
inline

Gets a sequence of tokens (substrings) extracted from this string.

Parameters
[out]listThe list of extracted tokens. Must be a reference to a container, such as Array or List, or a derived class. Typically, this parameter is a reference to a StringList.
cThe token separator character. Tokens will be separated by sequences of one or more instances of this character.
trimTrue to trim the extracted tokens. If this parameter is true, existing leading and trailing whitespace characters will be removed from each extracted token.
iStarting character index.

Returns the number of tokens extracted and added to the list.

Definition at line 2477 of file String.h.

◆ Break() [4/4]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
template<class C , typename S >
size_type pcl::GenericString< T, R, A >::Break ( C &  list,
const Array< S > &  ca,
bool  trim = false,
size_type  i = 0 
) const
inline

Gets a sequence of tokens (substrings) extracted from this string.

Parameters
[out]listThe list of extracted tokens. Must be a reference to a container, such as Array or List, or a derived class. Typically, this parameter is a reference to a StringList.
caAn array of token separator characters. Tokens will be separated by instances of any character included in this array. The template argument S must have type conversion semantics to the character type of this string class (char_type). If this array is empty, calling this function has no effect and zero is returned.
trimTrue to trim the extracted tokens. If this parameter is true, existing leading and trailing whitespace characters will be removed from each extracted token.
iStarting character index.

Returns the number of tokens extracted and added to the list.

Definition at line 2542 of file String.h.

◆ BreakIC() [1/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
template<class C , class R1 , class A1 >
size_type pcl::GenericString< T, R, A >::BreakIC ( C &  list,
const GenericString< T, R1, A1 > &  s,
bool  trim = false,
size_type  i = 0 
) const
inline

Gets a sequence of tokens (substrings) extracted from this string by performing case-insensitive comparisons with a token separation string.

Parameters
[out]listThe list of extracted tokens. Must be a reference to a container, such as Array or List, or a derived class. Typically, this parameter is a reference to a StringList.
sThe token separator string. This function performs case-insensitive string comparisons to locate instances of this string.
trimTrue to trim the extracted tokens. If this parameter is true, existing leading and trailing whitespace characters will be removed from each extracted token.
iStarting character index.

Returns the number of tokens extracted and added to the list.

Definition at line 2609 of file String.h.

◆ BreakIC() [2/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
template<class C >
size_type pcl::GenericString< T, R, A >::BreakIC ( C &  list,
const_c_string  s,
bool  trim = false,
size_type  i = 0 
) const
inline

Gets a sequence of tokens (substrings) extracted from this string by performing case-insensitive comparisons with a null-terminated token separation string.

Parameters
[out]listThe list of extracted tokens. Must be a reference to a container, such as Array or List, or a derived class. Typically, this parameter is a reference to a StringList.
sThe token separator null-terminated string. This function performs case-insensitive string comparisons to locate instances of this string.
trimTrue to trim the extracted tokens. If this parameter is true, existing leading and trailing whitespace characters will be removed from each extracted token.
iStarting character index.

Returns the number of tokens extracted and added to the list.

Definition at line 2675 of file String.h.

◆ BreakIC() [3/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
template<class C >
size_type pcl::GenericString< T, R, A >::BreakIC ( C &  list,
char_type  c,
bool  trim = false,
size_type  i = 0 
) const
inline

Gets a sequence of tokens (substrings) extracted from this string by performing case-insensitive comparisons with a token separator character.

Parameters
[out]listThe list of extracted tokens. Must be a reference to a container, such as Array or List, or a derived class. Typically, this parameter is a reference to a StringList.
cThe token separator character. Tokens will be separated by sequences of one or more instances of this character. This function performs case-insensitive character comparisons to locate instances of this character.
trimTrue to trim the extracted tokens. If this parameter is true, existing leading and trailing whitespace characters will be removed from each extracted token.
iStarting character index.

Returns the number of tokens extracted and added to the list.

Definition at line 2740 of file String.h.

◆ BytesPerChar()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
static size_type pcl::GenericString< T, R, A >::BytesPerChar ( )
inlinestaticnoexcept

Returns the number of bytes necessary to store a single character in this string.

This member function returns the R::BytesPerChar() static member function of the char traits class R.

Definition at line 715 of file String.h.

◆ c_copy()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::c_copy ( iterator  dst,
size_type  maxCharsToCopy,
size_type  i = 0 
) const
inlinenoexcept

Copies characters from this string to a null-terminated character array.

Parameters
[out]dstDestination character array.
maxCharsToCopyThe total number of characters that can be stored at the dst array, including a null terminating character.
iIndex of the first character to be copied from this string.

This function copies at most maxCharsToCopy-1 characters from this string (or Length()-i, whichever is less) to the dst array. Then a null terminating character is appended to dst.

Definition at line 1631 of file String.h.

◆ c_str()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
const_c_string pcl::GenericString< T, R, A >::c_str ( ) const
inlinenoexcept

Returns a pointer to the immutable internal data array of this string.

If this string is empty, this member function returns a pointer to a static, null-terminated, unmodifiable empty string (the "" C string). This function always returns a valid pointer to existing character data.

Definition at line 1127 of file String.h.

Referenced by pcl::Argument::Argument(), pcl::operator<<(), and pcl::operator>=().

◆ Capacity()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
size_type pcl::GenericString< T, R, A >::Capacity ( ) const
inlinenoexcept

Returns the total capacity of this string in characters.

The capacity of a string is the maximum number of characters that can be stored before requiring a reallocation of string data.

See also
Available(), Length(), Size()

Definition at line 750 of file String.h.

◆ CaseFolded()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
GenericString pcl::GenericString< T, R, A >::CaseFolded ( ) const
inline

Returns a duplicate of this string with all characters replaced with their case folded counterparts.

Definition at line 3994 of file String.h.

◆ CenterJustified()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
GenericString pcl::GenericString< T, R, A >::CenterJustified ( size_type  width,
char_type  fill = R::Blank() 
) const
inline

Returns a duplicate of this string padded equally to the left and right, using the specified fill character, up to the specified width.

See also
JustifyCenter(), LeftJustified(), RightJustified()

Definition at line 3580 of file String.h.

◆ Clear()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::Clear ( )
inline

Removes all characters in this string, yielding an empty string.

If this string is empty, then calling this member function has no effect.

If this string uniquely references its string data, it is destroyed and deallocated; otherwise its reference counter is decremented. Then a new, empty string data structure is created and uniquely referenced.

Definition at line 2235 of file String.h.

Referenced by pcl::Argument::StringValue(), and pcl::ProcessInterface::ValidateProcess().

◆ Compare() [1/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
template<class R1 , class A1 >
int pcl::GenericString< T, R, A >::Compare ( const GenericString< T, R1, A1 > &  s,
bool  caseSensitive = true,
bool  localeAware = true 
) const
inlinenoexcept

Lexicographical comparison between two strings.

Parameters
sA string to which this string will be compared.
caseSensitiveWhen true, a case-sensitive comparison is performed; otherwise the comparison does not distinguish between lowercase and uppercase characters (as defined by the selected locale). The default value of this parameter is true.
localeAwareWhen true, a locale-dependent comparison is done which takes into account the currently selected user locale (language and variants). When false, a locale-invariant comparison is carried out by comparing character code points (which is faster). The default value of this parameter is true.

Performs a character-to-character comparison between this string and the specified string s, and returns an integer that indicates the comparison result:

  • 0 if both strings are equal.
  • +1 if this string postcedes the specified string s.
  • -1 if this string precedes the specified string s.

Definition at line 3704 of file String.h.

◆ Compare() [2/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
int pcl::GenericString< T, R, A >::Compare ( const_c_string  t,
bool  caseSensitive = true,
bool  localeAware = true 
) const
inlinenoexcept

Lexicographical comparison to a null-terminated string.

Parameters
tThe starting address of a null-terminated string to which this string will be compared.
caseSensitiveWhen true, a case-sensitive comparison is performed; otherwise the comparison does not distinguish between lowercase and uppercase characters (as defined by the selected locale). The default value of this parameter is true.
localeAwareWhen true, a locale-dependent comparison is done which takes into account the currently selected user locale (language and variants). When false, a locale-invariant comparison is carried out by comparing character code points (which is faster). The default value of this parameter is true.

Performs a character-to-character comparison between this string and the specified null-terminated string t, and returns an integer that indicates the comparison result:

  • 0 if both strings are equal.
  • +1 if this string postcedes the specified string t.
  • -1 if this string precedes the specified string t.

Definition at line 3737 of file String.h.

◆ Compare() [3/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
int pcl::GenericString< T, R, A >::Compare ( char_type  c,
bool  caseSensitive = true,
bool  localeAware = true 
) const
inlinenoexcept

Lexicographical comparison to a single character.

Parameters
cA character to which this string will be compared.
caseSensitiveWhen true, a case-sensitive comparison is performed; otherwise the comparison does not distinguish between lowercase and uppercase characters (as defined by the selected locale). The default value of this parameter is true.
localeAwareWhen true, a locale-dependent comparison is done which takes into account the currently selected user locale (language and variants). When false, a locale-invariant comparison is carried out by comparing character code points (which is faster). The default value of this parameter is true.

Performs a comparison between this string and the specified character c, and returns an integer that indicates the comparison result:

  • 0 if this string is equal to c.
  • +1 if this string postcedes the character c.
  • -1 if this string precedes the character c.

The performed comparison is equivalent to a comparison of this string with a fictitious string of length one, whose only character was equal to the specified character c.

Definition at line 3771 of file String.h.

◆ CompareCodePoints() [1/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
template<class R1 , class A1 >
int pcl::GenericString< T, R, A >::CompareCodePoints ( const GenericString< T, R1, A1 > &  s,
bool  caseSensitive = true 
) const
inlinenoexcept

Compares numeric character values between two strings.

Parameters
sA string to which this string will be compared.
caseSensitiveWhen true, a case-sensitive comparison is performed; otherwise the comparison does not distinguish between lowercase and uppercase characters. The default value of this parameter is true.

Performs a character-to-character comparison of numeric character values between this string and the specified string s, and returns an integer that indicates the comparison result:

  • 0 if both strings are equal.
  • +1 if this string postcedes the specified string s.
  • -1 if this string precedes the specified string s.

This function ignores the current platform locale. It considers Unicode code points exclusively. For case-insensitive comparisons, a standard Unicode case folding transformation is applied to each character pair.

Definition at line 3611 of file String.h.

Referenced by pcl::operator<(), pcl::operator<=(), pcl::operator==(), pcl::operator>(), and pcl::operator>=().

◆ CompareCodePoints() [2/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
int pcl::GenericString< T, R, A >::CompareCodePoints ( const_c_string  t,
bool  caseSensitive = true 
) const
inlinenoexcept

Compares numeric character values a string and a null-terminated string.

Parameters
tThe starting address of a null-terminated string to which this string will be compared.
caseSensitiveWhen true, a case-sensitive comparison is performed; otherwise the comparison does not distinguish between lowercase and uppercase characters. The default value of this parameter is true.

Performs a character-to-character comparison of numeric character values between this string and the specified null-terminated string t, and returns an integer that indicates the comparison result:

  • 0 if both strings are equal.
  • +1 if this string postcedes the specified string t.
  • -1 if this string precedes the specified string t.

This function ignores the current platform locale. It considers Unicode code points exclusively. For case-insensitive comparisons, a standard Unicode case folding transformation is applied to each character pair.

Definition at line 3640 of file String.h.

◆ CompareCodePoints() [3/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
int pcl::GenericString< T, R, A >::CompareCodePoints ( char_type  c,
bool  caseSensitive = true 
) const
inlinenoexcept

Compares numeric character values a string and a null-terminated string.

Parameters
cA single character to which this string will be compared.
caseSensitiveWhen true, a case-sensitive comparison is performed; otherwise the comparison does not distinguish between lowercase and uppercase characters. The default value of this parameter is true.

Performs a comparison between this string and the specified character c, and returns an integer that indicates the comparison result:

  • 0 if this string is equal to c.
  • +1 if this string postcedes the character c.
  • -1 if this string precedes the character c.

The performed comparison is equivalent to a comparison of this string with a fictitious string of length one, whose only character was equal to the specified character c.

This function ignores the current platform locale. It considers Unicode code points exclusively. For case-insensitive comparisons, a standard Unicode case folding transformation is applied to each character pair.

Definition at line 3672 of file String.h.

◆ CompareIC() [1/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
template<class R1 , class A1 >
int pcl::GenericString< T, R, A >::CompareIC ( const GenericString< T, R1, A1 > &  s,
bool  localeAware = true 
) const
inlinenoexcept

Case-insensitive lexicographical comparison between two strings.

Parameters
sA string to which this string will be compared.
localeAwareWhen true, a locale-dependent comparison is done which takes into account the currently selected user locale (language and variants). When false, a locale-invariant comparison is carried out by comparing character code points (which is faster). The default value of this parameter is true.

Performs a character-to-character, case-insensitive comparison between this string and the specified string s, and returns an integer that indicates the comparison result:

  • 0 if both strings are equal.
  • +1 if this string postcedes the specified string s.
  • -1 if this string precedes the specified string s.

Definition at line 3797 of file String.h.

Referenced by pcl::EphemerisConstant::operator<(), pcl::operator<(), pcl::EphemerisConstant::operator==(), and pcl::operator==().

◆ CompareIC() [2/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
int pcl::GenericString< T, R, A >::CompareIC ( const_c_string  t,
bool  localeAware = true 
) const
inlinenoexcept

Case-insensitive lexicographical comparison to a null-terminated string.

Parameters
tThe starting address of a null-terminated string to which this string will be compared.
localeAwareWhen true, a locale-dependent comparison is done which takes into account the currently selected user locale (language and variants). When false, a locale-invariant comparison is carried out by comparing character code points (which is faster). The default value of this parameter is true.

Performs a character-to-character, case-insensitive comparison between this string and the specified null-terminated string t, and returns an integer that indicates the comparison result:

  • 0 if both strings are equal.
  • +1 if this string postcedes the specified string s.
  • -1 if this string precedes the specified string s.

Definition at line 3823 of file String.h.

◆ CompareIC() [3/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
int pcl::GenericString< T, R, A >::CompareIC ( char_type  c,
bool  localeAware = true 
) const
inlinenoexcept

Case-insensitive lexicographical comparison to a single character.

Parameters
cA character to which this string will be compared.
localeAwareWhen true, a locale-dependent comparison is done which takes into account the currently selected user locale (language and variants). When false, a locale-invariant comparison is carried out by comparing character code points (which is faster). The default value of this parameter is true.

Performs a case-insensitive comparison between this string and the specified character c, and returns an integer that indicates the comparison result:

  • 0 if this string is equal to c.
  • +1 if this string postcedes the character c.
  • -1 if this string precedes the character c.

The performed comparison is equivalent to a case-insensitive comparison of this string with a fictitious string of length one, whose only character was equal to c.

Definition at line 3852 of file String.h.

◆ Contains() [1/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
template<class R1 , class A1 >
bool pcl::GenericString< T, R, A >::Contains ( const GenericString< T, R1, A1 > &  s) const
inlinenoexcept

Returns true iff this string contains a substring s.

Definition at line 3199 of file String.h.

◆ Contains() [2/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
bool pcl::GenericString< T, R, A >::Contains ( const_c_string  t) const
inlinenoexcept

Returns true iff this string contains a null-terminated substring t.

Definition at line 3207 of file String.h.

◆ Contains() [3/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
bool pcl::GenericString< T, R, A >::Contains ( char_type  c) const
inlinenoexcept

Returns true iff this string contains a character c.

Definition at line 3215 of file String.h.

◆ ContainsIC() [1/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
template<class R1 , class A1 >
bool pcl::GenericString< T, R, A >::ContainsIC ( const GenericString< T, R1, A1 > &  s) const
inlinenoexcept

Returns true iff this string contains a substring s.

This member function performs case-insensitive string comparisons to find an instance of the specified substring s.

Definition at line 3227 of file String.h.

◆ ContainsIC() [2/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
bool pcl::GenericString< T, R, A >::ContainsIC ( const_c_string  t) const
inlinenoexcept

Returns true iff this string contains a null-terminated substring t.

This member function performs case-insensitive string comparisons to find an instance of the specified substring t.

Definition at line 3238 of file String.h.

◆ ContainsIC() [3/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
bool pcl::GenericString< T, R, A >::ContainsIC ( char_type  c) const
inlinenoexcept

Returns true iff this string contains a character c.

This member function performs case-insensitive character comparisons to find an instance of the specified character c.

Definition at line 3249 of file String.h.

◆ Delete()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::Delete ( size_type  i,
size_type  n = 1 
)
inline

Deletes a contiguous segment of at most n characters starting at the i-th character in this string.

Definition at line 2106 of file String.h.

◆ DeleteChar()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::DeleteChar ( char_type  c,
size_type  i = 0 
)
inline

Deletes all occurrences of the c character in a segment of contiguous characters starting from the i-th character and spanning to the end of this string.

Definition at line 2163 of file String.h.

◆ DeleteCharIC()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::DeleteCharIC ( char_type  c,
size_type  i = 0 
)
inline

Deletes all occurrences of the c character in a segment of contiguous characters starting from the i-th character and spanning to the end of this string.

This member function performs case-insensitive character comparisons.

Definition at line 2175 of file String.h.

◆ DeleteFreeList()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
static size_type pcl::GenericString< T, R, A >::DeleteFreeList ( )
inlinestatic

If the internal free list of string data structures is available, this function destroys it and returns the number of deleted structures. Otherwise the function has no effect and returns zero.

Note
This function is not thread-safe.

Definition at line 4243 of file String.h.

◆ DeleteLeft()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::DeleteLeft ( size_type  i)
inline

Deletes the initial segment of at most i contiguous characters in this string.

Definition at line 2153 of file String.h.

◆ DeleteRight()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::DeleteRight ( size_type  i)
inline

Deletes a segment of contiguous characters starting from the i-th character and spanning to the end of this string.

Definition at line 2144 of file String.h.

◆ DeleteString() [1/2]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
template<class R1 , class A1 >
void pcl::GenericString< T, R, A >::DeleteString ( const GenericString< T, R1, A1 > &  s,
size_type  i = 0 
)
inline

Deletes all occurrences of a string s in a segment of contiguous characters starting from the i-th character and spanning to the end of this string.

Definition at line 2186 of file String.h.

◆ DeleteString() [2/2]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::DeleteString ( const_c_string  t,
size_type  i = 0 
)
inline

Deletes all occurrences of a null-terminated string s in a segment of contiguous characters starting from the i-th character and spanning to the end of this string.

Definition at line 2196 of file String.h.

◆ DeleteStringIC() [1/2]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
template<class R1 , class A1 >
void pcl::GenericString< T, R, A >::DeleteStringIC ( const GenericString< T, R1, A1 > &  s,
size_type  i = 0 
)
inline

Deletes all occurrences of a string s in a segment of contiguous characters starting from the i-th character and spanning to the end of this string.

This member function performs case-insensitive string comparisons.

Definition at line 2209 of file String.h.

◆ DeleteStringIC() [2/2]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::DeleteStringIC ( const_c_string  t,
size_type  i = 0 
)
inline

Deletes all occurrences of a null-terminated string s in a segment of contiguous characters starting from the i-th character and spanning to the end of this string.

This member function performs case-insensitive string comparisons.

Definition at line 2221 of file String.h.

◆ DoubleQuoted()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
GenericString pcl::GenericString< T, R, A >::DoubleQuoted ( ) const
inline

Returns a duplicate of this string enclosed by double quote characters ("). If this string is already double quoted, this function returns an unmodified copy.

See also
EnsureDoubleQuoted()

Definition at line 3437 of file String.h.

◆ Enclosed()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
GenericString pcl::GenericString< T, R, A >::Enclosed ( char_type  c) const
inline

Returns a duplicate of this string enclosed by the specified character. If this string is already enclosed by c, this function returns an unmodified copy.

See also
EnsureEnclosed()

Definition at line 3389 of file String.h.

◆ End() [1/2]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
iterator pcl::GenericString< T, R, A >::End ( )
inline

Returns a mutable iterator pointing to the end of this string. The returned iterator points to the next-to-last character of this string.

If this string is not unique, it is made unique before returning from this member function.

If this string is empty, this member function returns nullptr.

See also
Begin()

Definition at line 983 of file String.h.

Referenced by pcl::XML::IsValidName(), pcl::File::OutText(), pcl::XML::ReferenceValue(), and pcl::File::Write().

◆ End() [2/2]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
const_iterator pcl::GenericString< T, R, A >::End ( ) const
inlinenoexcept

Returns an immutable iterator pointing to the end of this string. The returned iterator points to the next-to-last character of this string.

If this string is empty, this member function returns nullptr.

See also
Begin() const

Definition at line 997 of file String.h.

◆ end() [1/2]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
iterator pcl::GenericString< T, R, A >::end ( )
inline

STL-compatible iteration. Equivalent to End().

Definition at line 1106 of file String.h.

◆ end() [2/2]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
const_iterator pcl::GenericString< T, R, A >::end ( ) const
inlinenoexcept

STL-compatible iteration. Equivalent to End() const.

Definition at line 1114 of file String.h.

◆ EndsWith() [1/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
template<class R1 , class A1 >
bool pcl::GenericString< T, R, A >::EndsWith ( const GenericString< T, R1, A1 > &  s) const
inlinenoexcept

Returns true iff this string ends with the specified substring s.

Definition at line 2881 of file String.h.

◆ EndsWith() [2/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
bool pcl::GenericString< T, R, A >::EndsWith ( const_c_string  t) const
inlinenoexcept

Returns true iff this string ends with the specified null-terminated string t.

Definition at line 2896 of file String.h.

◆ EndsWith() [3/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
bool pcl::GenericString< T, R, A >::EndsWith ( char_type  c) const
inlinenoexcept

Returns true iff this string ends with the specified character c.

Definition at line 2910 of file String.h.

◆ EndsWithIC() [1/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
template<class R1 , class A1 >
bool pcl::GenericString< T, R, A >::EndsWithIC ( const GenericString< T, R1, A1 > &  s) const
inlinenoexcept

Returns true iff this string ends with the specified substring s, performing case-insensitive character comparisons.

Definition at line 2920 of file String.h.

◆ EndsWithIC() [2/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
bool pcl::GenericString< T, R, A >::EndsWithIC ( const_c_string  t) const
inlinenoexcept

Returns true iff this string ends with the specified null-terminated string t, performing case-insensitive character comparisons.

Definition at line 2935 of file String.h.

◆ EndsWithIC() [3/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
bool pcl::GenericString< T, R, A >::EndsWithIC ( char_type  c) const
inlinenoexcept

Returns true iff this string ends with the specified character c, performing a case-insensitive character comparison.

Definition at line 2950 of file String.h.

◆ EnsureDoubleQuoted()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::EnsureDoubleQuoted ( )
inline

Ensures that this string is enclosed by a leading and a trailing instance of the double quote character ("). If this string is already double quoted, this function does nothing.

See also
DoubleQuoted()

Definition at line 3426 of file String.h.

Referenced by pcl::GenericString< char, IsoCharTraits, PCL_STRING_ALLOCATOR >::DoubleQuoted().

◆ EnsureEnclosed()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::EnsureEnclosed ( char_type  c)
inline

Ensures that this string is enclosed by a leading and a trailing instance of the specified character c. If this string is already enclosed by c, this function does nothing.

See also
Enclosed()

Definition at line 3345 of file String.h.

Referenced by pcl::GenericString< char, IsoCharTraits, PCL_STRING_ALLOCATOR >::Enclosed().

◆ EnsureSingleQuoted()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::EnsureSingleQuoted ( )
inline

Ensures that this string is enclosed by a leading and a trailing instance of the single quote character ('). If this string is already single quoted, this function does nothing.

See also
SingleQuoted()

Definition at line 3402 of file String.h.

Referenced by pcl::FITSHeaderKeyword::FixValueDelimiters(), and pcl::GenericString< char, IsoCharTraits, PCL_STRING_ALLOCATOR >::SingleQuoted().

◆ EnsureUnique()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::EnsureUnique ( )
inline

Ensures that this string uniquely references its string data.

If necessary, this member function generates a duplicate of the string data, references it, and then decrements the reference counter of the original string data.

See also
IsUnique(), IsAliasOf()

Definition at line 695 of file String.h.

◆ Fill() [1/2]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::Fill ( char_type  c)
inline

Fills this string (if not empty) with the specified character c.

Note
The null terminating character can legally be specified as a filling character with this function. In this case the internal string pointer will be seen as an empty string by C library routines (such as strlen or strcpy) and other applications after calling this function, although it will continue storing the same allocated data block.

Definition at line 1357 of file String.h.

◆ Fill() [2/2]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::Fill ( char_type  c,
size_type  i,
size_type  n = maxPos 
)
inline

Fills a segment of at most n contiguous characters in this string with the specified character c, starting from the i-th character.

If i is greater than or equal to the length of this string, then calling this function has no effect. Otherwise the character count n will be constrained to replace existing characters in this string.

Note
The null terminating character can legally be specified as a filling character with this function. In this case the internal string pointer will be seen as an empty string by C library routines (such as strlen or strcpy) and other applications after calling this function, although it will continue storing the same allocated data block.

Definition at line 1386 of file String.h.

◆ Find() [1/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
template<class R1 , class A1 >
size_type pcl::GenericString< T, R, A >::Find ( const GenericString< T, R1, A1 > &  s,
size_type  i = 0 
) const
inlinenoexcept

A synonym for FindFirst( const GenericString<T,R1,A1>&, size_type ).

Definition at line 3045 of file String.h.

◆ Find() [2/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
size_type pcl::GenericString< T, R, A >::Find ( const_c_string  t,
size_type  i = 0 
) const
inlinenoexcept

A synonym for FindFirst( const_c_string, size_type ).

Definition at line 3053 of file String.h.

◆ Find() [3/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
size_type pcl::GenericString< T, R, A >::Find ( char_type  c,
size_type  i = 0 
) const
inlinenoexcept

A synonym for FindFirst( char_type, size_type ).

Definition at line 3061 of file String.h.

◆ FindFirst() [1/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
template<class R1 , class A1 >
size_type pcl::GenericString< T, R, A >::FindFirst ( const GenericString< T, R1, A1 > &  s,
size_type  i = 0 
) const
inlinenoexcept

Returns the starting index k of the first occurrence of a substring s in this string, such that k >= i. Returns notFound if such occurrence does not exist.

Definition at line 2961 of file String.h.

◆ FindFirst() [2/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
size_type pcl::GenericString< T, R, A >::FindFirst ( const_c_string  t,
size_type  i = 0 
) const
inlinenoexcept

Returns the starting index k of the first occurrence of a null-terminated substring t in this string, such that k >= i. Returns notFound if such occurrence does not exist.

Definition at line 2973 of file String.h.

◆ FindFirst() [3/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
size_type pcl::GenericString< T, R, A >::FindFirst ( char_type  c,
size_type  i = 0 
) const
inlinenoexcept

Returns the index k of the first occurrence of a character c in this string, such that k >= i. Returns notFound if such occurrence does not exist.

Definition at line 2985 of file String.h.

◆ FindFirstIC() [1/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
template<class R1 , class A1 >
size_type pcl::GenericString< T, R, A >::FindFirstIC ( const GenericString< T, R1, A1 > &  s,
size_type  i = 0 
) const
inlinenoexcept

Returns the starting index k of the first occurrence of a substring s in this string, such that k >= i. Returns notFound if such occurrence does not exist.

This member function performs case-insensitive string comparisons to find an instance of the substring s.

Definition at line 3002 of file String.h.

◆ FindFirstIC() [2/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
size_type pcl::GenericString< T, R, A >::FindFirstIC ( const_c_string  t,
size_type  i = 0 
) const
inlinenoexcept

Returns the starting index k of the first occurrence of a null-terminated substring s in this string, such that k >= i. Returns notFound if such occurrence does not exist.

This member function performs case-insensitive string comparisons to find an instance of the substring s.

Definition at line 3017 of file String.h.

◆ FindFirstIC() [3/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
size_type pcl::GenericString< T, R, A >::FindFirstIC ( char_type  c,
size_type  i = 0 
) const
inlinenoexcept

Returns the index k of the first occurrence of a character c in this string, such that k >= i. Returns notFound if such occurrence does not exist.

This member function performs case-insensitive character comparisons to find an instance of the character c.

Definition at line 3032 of file String.h.

◆ FindIC() [1/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
template<class R1 , class A1 >
size_type pcl::GenericString< T, R, A >::FindIC ( const GenericString< T, R1, A1 > &  s,
size_type  i = 0 
) const
inlinenoexcept

A synonym for FindFirstIC( const GenericString<T,R1,A1>&, size_type ).

Definition at line 3070 of file String.h.

◆ FindIC() [2/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
size_type pcl::GenericString< T, R, A >::FindIC ( const_c_string  t,
size_type  i = 0 
) const
inlinenoexcept

A synonym for FindFirstIC( const_c_string, size_type ).

Definition at line 3078 of file String.h.

◆ FindIC() [3/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
size_type pcl::GenericString< T, R, A >::FindIC ( char_type  c,
size_type  i = 0 
) const
inlinenoexcept

A synonym for FindFirstIC( char_type, size_type ).

Definition at line 3086 of file String.h.

◆ FindLast() [1/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
template<class R1 , class A1 >
size_type pcl::GenericString< T, R, A >::FindLast ( const GenericString< T, R1, A1 > &  s,
size_type  r = maxPos 
) const
inlinenoexcept

Returns the starting index k of the last occurrence of a substring s in this string, such that:

k <= r - n,

where n is the length of the substring s. Returns notFound if such occurrence does not exist.

Definition at line 3101 of file String.h.

◆ FindLast() [2/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
size_type pcl::GenericString< T, R, A >::FindLast ( const_c_string  t,
size_type  r = maxPos 
) const
inlinenoexcept

Returns the starting index k of the last occurrence of a null-terminated substring t in this string, such that:

0 <= k <= r - n,

where n is the length of the substring t. Returns notFound if such occurrence does not exist.

Definition at line 3117 of file String.h.

◆ FindLast() [3/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
size_type pcl::GenericString< T, R, A >::FindLast ( char_type  c,
size_type  r = maxPos 
) const
inlinenoexcept

Returns the index k of the last occurrence of a character c in this string, such that k < r. Returns notFound if such occurrence does not exist.

Definition at line 3129 of file String.h.

◆ FindLastIC() [1/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
template<class R1 , class A1 >
size_type pcl::GenericString< T, R, A >::FindLastIC ( const GenericString< T, R1, A1 > &  s,
size_type  r = maxPos 
) const
inlinenoexcept

Returns the starting index k of the last occurrence of a substring s in this string, such that:

k <= r - n,

where n is the length of the substring s. Returns notFound if such occurrence does not exist.

This member function performs case-insensitive string comparisons to find an instance of the specified substring s.

Definition at line 3151 of file String.h.

◆ FindLastIC() [2/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
size_type pcl::GenericString< T, R, A >::FindLastIC ( const_c_string  t,
size_type  r = maxPos 
) const
inlinenoexcept

Returns the starting index k of the last occurrence of a null-terminated substring t in this string, such that:

0 <= k <= r - n,

where n is the length of the substring t. Returns notFound if such occurrence does not exist.

This member function performs case-insensitive string comparisons to find an instance of the specified substring t.

Definition at line 3170 of file String.h.

◆ FindLastIC() [3/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
size_type pcl::GenericString< T, R, A >::FindLastIC ( char_type  c,
size_type  r = maxPos 
) const
inlinenoexcept

Returns the index k of the last occurrence of a character c in this string, such that k < r. Returns notFound if such occurrence does not exist.

This member function performs case-insensitive character comparisons to find an instance of the specified character c.

Definition at line 3185 of file String.h.

◆ FirstChar()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
char_type pcl::GenericString< T, R, A >::FirstChar ( ) const
inlinenoexcept

Returns the first character in this string, or a null character (R::Null()) if this string is empty.

Definition at line 2787 of file String.h.

◆ Hash()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
uint64 pcl::GenericString< T, R, A >::Hash ( uint64  seed = 0) const
inlinenoexcept

Returns a non-cryptographic hash value computed for this string. This function is a synonym for Hash64().

Definition at line 4231 of file String.h.

◆ Hash32()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
uint32 pcl::GenericString< T, R, A >::Hash32 ( uint32  seed = 0) const
inlinenoexcept

Returns a 32-bit non-cryptographic hash value computed for this string.

This function calls pcl::Hash32() for the internal string buffer.

The seed parameter can be used to generate repeatable hash values. It can also be set to a random value in compromised environments.

Definition at line 4222 of file String.h.

Referenced by pcl::CryptographicHashFactory::CryptographicHashFactory().

◆ Hash64()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
uint64 pcl::GenericString< T, R, A >::Hash64 ( uint64  seed = 0) const
inlinenoexcept

Returns a 64-bit non-cryptographic hash value computed for this string.

This function calls pcl::Hash64() for the internal string buffer.

The seed parameter can be used to generate repeatable hash values. It can also be set to a random value in compromised environments.

Definition at line 4209 of file String.h.

◆ HasWildcards()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
bool pcl::GenericString< T, R, A >::HasWildcards ( ) const
inlinenoexcept

Returns true iff this string contains one or more wildcard characters (asterisk '*' or question mark '?').

Definition at line 3940 of file String.h.

◆ IndexAt()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
size_type pcl::GenericString< T, R, A >::IndexAt ( const_iterator  i) const
inlinenoexcept

Returns the zero-based character index corresponding to a valid iterator i in this string. This is equivalent to i - Begin().

The specified iterator must be posterior to or located at the starting iterator of this string, as returned by Begin(). However, for performance reasons this condition is neither enforced nor verified. If an invalid iterator is specified, then this function, as well as any subsequent use of the returned character index, may invoke undefined behavior.

Definition at line 1080 of file String.h.

◆ Insert() [1/5]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
template<class R1 , class A1 >
void pcl::GenericString< T, R, A >::Insert ( size_type  i,
const GenericString< T, R1, A1 > &  s 
)
inline

Inserts a copy of the string s at the index i in this string.

Definition at line 1655 of file String.h.

◆ Insert() [2/5]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::Insert ( size_type  i,
const_iterator  p,
const_iterator  q 
)
inline

Inserts a copy of the character sequence defined by the range [p,q) at the index i in this string.

If p is greater than or equal to q, calling this member function has no effect.

Definition at line 1672 of file String.h.

◆ Insert() [3/5]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::Insert ( size_type  i,
const_c_string  t 
)
inline

Inserts a null-terminated character sequence t at the index i in this string.

Definition at line 1686 of file String.h.

◆ Insert() [4/5]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::Insert ( size_type  i,
const_c_string  t,
size_type  n 
)
inline

Inserts at most the first n characters of a null-terminated character sequence t at the index i in this string.

Definition at line 1700 of file String.h.

◆ Insert() [5/5]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::Insert ( size_type  i,
char_type  c,
size_type  n = 1 
)
inline

Inserts n copies of a character c at the index i in this string.

Definition at line 1712 of file String.h.

◆ IsAliasOf()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
bool pcl::GenericString< T, R, A >::IsAliasOf ( const GenericString< T, R, A > &  s) const
inlinenoexcept

Returns true iff this string is an alias of another string s.

Two strings are aliases if both share the same string data.

See also
IsUnique(), EnsureUnique()

Definition at line 681 of file String.h.

◆ IsEmpty()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
bool pcl::GenericString< T, R, A >::IsEmpty ( ) const
inlinenoexcept

◆ IsNumeral()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
bool pcl::GenericString< T, R, A >::IsNumeral ( ) const
inlinenoexcept

Returns true iff this string can be interpreted as a numeric literal:

  • The string is not empty.
  • It is not exclusively composed of trimable characters.
  • Its first non-trimable character is either a sign character, a decimal digit, or a decimal separator.
Note
This member function does not guarantee that this string contains a valid numeric literal. It only checks for the role of this string as a token in the context of a syntactic analysis.

Definition at line 4112 of file String.h.

Referenced by pcl::FITSHeaderKeyword::IsNumeric().

◆ IsSymbol()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
bool pcl::GenericString< T, R, A >::IsSymbol ( ) const
inlinenoexcept

Returns true iff this string can be interpreted as a symbol identifier:

  • The string is not empty.
  • It is not exclusively composed of trimable characters.
  • Its first non-trimable character is either an alphabetic character or an underscore character.
Note
This member function does not guarantee that this string contains a valid symbol identifier. It only checks for the role of this string as a token in the context of a syntactic analysis.

Definition at line 4134 of file String.h.

◆ IsUnique()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
bool pcl::GenericString< T, R, A >::IsUnique ( ) const
inlinenoexcept

Returns true iff this string uniquely references its string data.

See also
EnsureUnique(), IsAliasOf()

Definition at line 669 of file String.h.

◆ IsValid()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
bool pcl::GenericString< T, R, A >::IsValid ( ) const
inlinenoexcept

Returns true only if this string is valid. A string is valid if it references an internal string structure, even if it is an empty string.

In general, all GenericString objects are valid with only two exceptions:

  • Objects that have been move-copied or move-assigned to other strings.
  • Objects that have been invalidated explicitly by calling Transfer().

An invalid string object cannot be used and should be destroyed immediately. Invalid strings are always destroyed automatically during move construction and move assignment operations.

See also
IsEmpty()

Definition at line 783 of file String.h.

◆ IsValidIdentifier() [1/2]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
bool pcl::GenericString< T, R, A >::IsValidIdentifier ( distance_type pos) const
inlinenoexcept

Returns true only if this string contains a valid identifier:

  • It is not an empty string.
  • Its first character is either an alphabetic character or an underscore character.
  • Its second and successive characters, if they exist, are all of them either alphabetic characters, decimal digits, or underscores.

If this string is not a valid identifier, the pos variable will be set equal to the index of the first offending character (the first character that violates the above conditions).

Definition at line 4157 of file String.h.

◆ IsValidIdentifier() [2/2]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
bool pcl::GenericString< T, R, A >::IsValidIdentifier ( ) const
inlinenoexcept

Returns true only if this string contains a valid identifier:

  • It is not an empty string.
  • Its first character is either an alphabetic character or an underscore character.
  • Its second and successive characters, if they exist, are all of them either alphabetic characters, decimal digits, or underscores.

Definition at line 4188 of file String.h.

◆ JustifyCenter()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::JustifyCenter ( size_type  width,
char_type  fill = R::Blank() 
)
inline

Pads this string equally to the left and right, using the specified fill character, up to the specified width.

If the current length n of this string is less than the specified width, let m = width - n, and let m2 = m/2. Then m2 copies of the fill character will be prepended to the string, and m - m2 fill characters will be appended. If the current length is greater than or equal to width, this function has no effect.

See also
JustifyLeft(), JustifyRight(), CenterJustified()

Definition at line 3536 of file String.h.

Referenced by pcl::GenericString< char, IsoCharTraits, PCL_STRING_ALLOCATOR >::CenterJustified().

◆ JustifyLeft()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::JustifyLeft ( size_type  width,
char_type  fill = R::Blank() 
)
inline

Pads this string to the right, using the specified fill character, up to the specified width.

If the current length n of this string is less than the specified width, width - n copies of the fill character will be appended to the string. If the current length is greater than or equal to width, this function has no effect.

See also
JustifyRight(), JustifyCenter(), LeftJustified()

Definition at line 3499 of file String.h.

Referenced by pcl::GenericString< char, IsoCharTraits, PCL_STRING_ALLOCATOR >::LeftJustified().

◆ JustifyRight()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::JustifyRight ( size_type  width,
char_type  fill = R::Blank() 
)
inline

Pads this string to the left, using the specified fill character, up to the specified width.

If the current length n of this string is less than the specified width, width - n copies of the fill character will be prepended to the string. If the current length is greater than or equal to width, this function has no effect.

See also
JustifyLeft(), JustifyCenter(), RightJustified()

Definition at line 3517 of file String.h.

Referenced by pcl::GenericString< char, IsoCharTraits, PCL_STRING_ALLOCATOR >::RightJustified().

◆ LastChar()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
char_type pcl::GenericString< T, R, A >::LastChar ( ) const
inlinenoexcept

Returns the last character in this string, or a null character (R::Null()) if this string is empty.

Definition at line 2796 of file String.h.

◆ Left()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
GenericString pcl::GenericString< T, R, A >::Left ( size_type  n) const
inline

Returns a string with a copy of the at most n contiguous initial characters of this string.

Definition at line 2277 of file String.h.

◆ LeftJustified()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
GenericString pcl::GenericString< T, R, A >::LeftJustified ( size_type  width,
char_type  fill = R::Blank() 
) const
inline

Returns a duplicate of this string padded to the right, using the specified fill character, up to the specified width.

See also
JustifyLeft(), RightJustified(), CenterJustified()

Definition at line 3554 of file String.h.

◆ Length()

◆ LowerBound()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
size_type pcl::GenericString< T, R, A >::LowerBound ( ) const
inlinenoexcept

Returns the minimum valid character index.

This member function exists for compatibility with PCL containers. It always returns zero.

See also
UpperBound(), Length()

Definition at line 808 of file String.h.

◆ Lowercase()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
GenericString pcl::GenericString< T, R, A >::Lowercase ( ) const
inline

Returns a duplicate of this string with all uppercase characters replaced with their lowercase counterparts.

Definition at line 4005 of file String.h.

◆ operator*() [1/2]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
char_type& pcl::GenericString< T, R, A >::operator* ( )
inline

Returns a reference to the first character in this string.

This is a convenience member function, equivalent to *At( 0 ).

See also
operator []( size_type ), At()

Definition at line 924 of file String.h.

◆ operator*() [2/2]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
char_type pcl::GenericString< T, R, A >::operator* ( ) const
inlinenoexcept

Returns a copy of the first character in this string.

This is a convenience member function, equivalent to *At( 0 ).

See also
operator []( size_type ) const, At()

Definition at line 937 of file String.h.

◆ operator+=() [1/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
template<class R1 , class A1 >
GenericString& pcl::GenericString< T, R, A >::operator+= ( const GenericString< T, R1, A1 > &  s)
inline

Appends a copy of a string by calling Append( s ). Returns a reference to this object.

Definition at line 1735 of file String.h.

◆ operator+=() [2/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
GenericString& pcl::GenericString< T, R, A >::operator+= ( const_c_string  t)
inline

Appends a copy of a null-terminated string by calling Append( t ). Returns a reference to this object.

Definition at line 1774 of file String.h.

◆ operator+=() [3/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
GenericString& pcl::GenericString< T, R, A >::operator+= ( char_type  c)
inline

Appends a copy of the specified character c to this string. Returns a reference to this object.

Definition at line 1838 of file String.h.

◆ operator-=() [1/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
template<class R1 , class A1 >
GenericString& pcl::GenericString< T, R, A >::operator-= ( const GenericString< T, R1, A1 > &  s)
inline

Inserts a copy of a string s at the beginning of this string. Returns a reference to this object.

Definition at line 1859 of file String.h.

◆ operator-=() [2/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
GenericString& pcl::GenericString< T, R, A >::operator-= ( const_c_string  t)
inline

Inserts a copy of the null-terminated sequence t at the beginning of this string. Returns a reference to this object.

Definition at line 1899 of file String.h.

◆ operator-=() [3/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
GenericString& pcl::GenericString< T, R, A >::operator-= ( char_type  c)
inline

Inserts a copy of the specified character c at the beginning of this string. Returns a reference to this object.

Definition at line 1917 of file String.h.

◆ operator=() [1/4]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
GenericString& pcl::GenericString< T, R, A >::operator= ( const GenericString< T, R, A > &  s)
inline

Copy assignment operator. Returns a reference to this object.

This operator calls Assign() with the specified source string s.

Definition at line 1138 of file String.h.

◆ operator=() [2/4]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
GenericString& pcl::GenericString< T, R, A >::operator= ( GenericString< T, R, A > &&  s)
inline

Move assignment operator. Returns a reference to this object.

This operator calls Transfer() with the specified source string s.

Definition at line 1170 of file String.h.

◆ operator=() [3/4]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
GenericString& pcl::GenericString< T, R, A >::operator= ( const_c_string  t)
inline

Assigns a copy of the null-terminated character sequence stored in the specified array t to this string. Returns a reference to this object.

Definition at line 1212 of file String.h.

◆ operator=() [4/4]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
GenericString& pcl::GenericString< T, R, A >::operator= ( char_type  c)
inline

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

Definition at line 1222 of file String.h.

◆ operator[]() [1/2]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
char_type& pcl::GenericString< T, R, A >::operator[] ( size_type  i)
inline

Returns a reference to the i-th character in this string. The character index i must be in the range [0,Length()).

If this string is not unique, it is made unique before returning from this member function.

If this string is empty, or if the specified index i is out of range, calling this member function is an error that leads to an invalid result.

See also
At(), operator *()

Definition at line 898 of file String.h.

◆ operator[]() [2/2]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
char_type pcl::GenericString< T, R, A >::operator[] ( size_type  i) const
inlinenoexcept

Returns a copy of the i-th character in this string. The character index i must be in the range [0,Length()).

If this string is empty, or if the specified index i is out of range, calling this member function is an error that leads to an invalid result.

See also
At() const, operator *() const

Definition at line 912 of file String.h.

◆ Prefix()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
GenericString pcl::GenericString< T, R, A >::Prefix ( size_type  i) const
inline

Returns the prefix of this string ending at index i. Calling this member function is equivalent to:

Left( i-1 )

Definition at line 2334 of file String.h.

◆ Prepend() [1/5]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
template<class R1 , class A1 >
void pcl::GenericString< T, R, A >::Prepend ( const GenericString< T, R1, A1 > &  s)
inline

Inserts a copy of the specified string s at the beginning of this string.

Definition at line 1849 of file String.h.

Referenced by pcl::operator+().

◆ Prepend() [2/5]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::Prepend ( const_iterator  i,
const_iterator  j 
)
inline

Inserts a copy of the character sequence defined by the range [i,j) at the beginning of this string.

If i is greater than or equal to j, calling this member function has no effect.

Definition at line 1872 of file String.h.

◆ Prepend() [3/5]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::Prepend ( const_c_string  t,
size_type  n 
)
inline

Inserts a copy of the first n characters of a character array t at the beginning of this string.

Definition at line 1881 of file String.h.

◆ Prepend() [4/5]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::Prepend ( const_c_string  t)
inline

Inserts a copy of the null-terminated character sequence t at the beginning of this string.

Definition at line 1890 of file String.h.

◆ Prepend() [5/5]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::Prepend ( char_type  c,
size_type  n = 1 
)
inline

Inserts n copies of a character c at the beginning of this string.

Definition at line 1908 of file String.h.

◆ Release()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
c_string pcl::GenericString< T, R, A >::Release ( )
inline

Releases the data in this string.

This member function returns a pointer to the string data block referenced by this object, after ensuring that it is uniquely referenced. If the string is empty, this function may return the null pointer.

Before returning, this member function empties this string without deallocating its string data. The caller is then responsible for destructing and/or deallocating the returned block when it is no longer required.

Definition at line 1607 of file String.h.

◆ Replace() [1/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
template<class R1 , class A1 >
void pcl::GenericString< T, R, A >::Replace ( size_type  i,
size_type  n,
const GenericString< T, R1, A1 > &  s 
)
inline

Replaces a segment of n contiguous characters, starting at the i-th character in this string, with a copy of a string s.

Definition at line 1928 of file String.h.

◆ Replace() [2/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::Replace ( size_type  i,
size_type  n,
const_c_string  t 
)
inline

Replaces a segment of at most n contiguous characters, starting at the i-th character in this string, with a copy of a null-terminated sequence t.

If t is a pointer to the contents of this string (or, equivalently, an iterator on this string), this function invokes undefined behavior.

Definition at line 1967 of file String.h.

◆ Replace() [3/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::Replace ( size_type  i,
size_type  n,
char_type  c,
size_type  nc = 1 
)
inline

Replaces a segment of at most n contiguous characters, starting at the i-th character in this string, with nc copies of a character c.

Definition at line 2002 of file String.h.

◆ ReplaceChar()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::ReplaceChar ( char_type  c1,
char_type  c2,
size_type  i = 0,
size_type  n = maxPos 
)
inline

Replaces all occurrences of a character c1 with c2 in a segment of n contiguous characters starting at the i-th character in this string.

Definition at line 2037 of file String.h.

◆ ReplaceCharIC()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::ReplaceCharIC ( char_type  c1,
char_type  c2,
size_type  i = 0,
size_type  n = maxPos 
)
inline

Replaces all occurrences of a character c1 with c2 in a segment of n contiguous characters starting at the i-th character in this string.

This member function performs case-insensitive character comparisons.

Definition at line 2049 of file String.h.

◆ ReplaceString() [1/2]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
template<class R1 , class A1 , class R2 , class A2 >
void pcl::GenericString< T, R, A >::ReplaceString ( const GenericString< T, R1, A1 > &  s1,
const GenericString< T, R2, A2 > &  s2,
size_type  i = 0 
)
inline

Replaces all occurrences of a string s1 with s2 in a segment of contiguous characters starting at the i-th character, and spanning to the end of this string.

Definition at line 2060 of file String.h.

◆ ReplaceString() [2/2]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::ReplaceString ( const_c_string  t1,
const_c_string  t2,
size_type  i = 0 
)
inline

Replaces all occurrences of a null-terminated string t1 with t2 in a segment of contiguous characters starting at the i-th character, and spanning to the end of this string.

Definition at line 2071 of file String.h.

◆ ReplaceStringIC() [1/2]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
template<class R1 , class A1 , class R2 , class A2 >
void pcl::GenericString< T, R, A >::ReplaceStringIC ( const GenericString< T, R1, A1 > &  s1,
const GenericString< T, R2, A2 > &  s2,
size_type  i = 0 
)
inline

Replaces all occurrences of a string s1 with s2 in a segment of contiguous characters starting at the i-th character, and spanning to the end of this string.

This member function performs case-insensitive string comparisons.

Definition at line 2084 of file String.h.

◆ ReplaceStringIC() [2/2]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::ReplaceStringIC ( const_c_string  t1,
const_c_string  t2,
size_type  i = 0 
)
inline

Replaces all occurrences of a null-terminated string t1 with t2 in a segment of contiguous characters starting at the i-th character, and spanning to the end of this string.

This member function performs case-insensitive string comparisons.

Definition at line 2097 of file String.h.

◆ Reserve()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::Reserve ( size_type  n)
inline

Ensures that this string has enough capacity to store n characters plus a terminating null character.

After calling this member function with n > 0, this object is guaranteed to uniquely reference its string data.

Definition at line 1439 of file String.h.

◆ ResizedToNullTerminated()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
GenericString pcl::GenericString< T, R, A >::ResizedToNullTerminated ( ) const
inline

Returns a copy of this string resized to match the length of its internal null-terminated string buffer.

Definition at line 1537 of file String.h.

◆ ResizeToNullTerminated()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::ResizeToNullTerminated ( )
inline

Resizes this string to match the length of the internal null-terminated string buffer.

This member function scans the internal string buffer for a terminating null character, then calls SetLength() to set the corresponding length in characters.

Definition at line 1528 of file String.h.

Referenced by pcl::GenericString< char, IsoCharTraits, PCL_STRING_ALLOCATOR >::ResizedToNullTerminated().

◆ Reverse()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::Reverse ( )
inline

Transposes the characters in this string, so that the first character becomes the last and the last becomes the first, the second becomes the next-to-last, and so on.

Definition at line 4028 of file String.h.

Referenced by pcl::GenericString< char, IsoCharTraits, PCL_STRING_ALLOCATOR >::Reversed().

◆ ReverseBegin() [1/2]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
reverse_iterator pcl::GenericString< T, R, A >::ReverseBegin ( )
inline

Returns a reverse mutable iterator pointing to the reverse beginning of this string. The returned iterator points to the last character of this string.

If this string is not unique, it is made unique before returning from this member function.

If this string is empty, this member function returns a null reverse iterator.

See also
ReverseEnd()

Definition at line 1015 of file String.h.

◆ ReverseBegin() [2/2]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
const_reverse_iterator pcl::GenericString< T, R, A >::ReverseBegin ( ) const
inlinenoexcept

Returns an immutable reverse iterator pointing to the reverse beginning of this string. The returned iterator points to the last character of this string.

If this string is empty, this member function returns a null reverse iterator.

See also
ReverseEnd() const

Definition at line 1031 of file String.h.

◆ Reversed()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
GenericString pcl::GenericString< T, R, A >::Reversed ( ) const
inline

Returns a duplicate of this string with its characters in reverse order.

Definition at line 4041 of file String.h.

◆ ReverseEnd() [1/2]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
reverse_iterator pcl::GenericString< T, R, A >::ReverseEnd ( )
inline

Returns a reverse mutable iterator pointing to the reverse end of this string. The returned iterator points to the previous-to-first character of this string.

If this string is not unique, it is made unique before returning from this member function.

If this string is empty, this member function returns a null reverse iterator.

See also
ReverseBegin()

Definition at line 1049 of file String.h.

◆ ReverseEnd() [2/2]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
const_reverse_iterator pcl::GenericString< T, R, A >::ReverseEnd ( ) const
inlinenoexcept

Returns an immutable reverse iterator pointing to the reverse end of this string. The returned iterator points to the previous-to-first character of this string.

If this string is empty, this member function returns a null reverse iterator.

See also
ReverseBegin() const

Definition at line 1065 of file String.h.

◆ Right()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
GenericString pcl::GenericString< T, R, A >::Right ( size_type  n) const
inline

Returns a string with a copy of the at most n contiguous ending characters of this string.

Definition at line 2299 of file String.h.

◆ RightJustified()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
GenericString pcl::GenericString< T, R, A >::RightJustified ( size_type  width,
char_type  fill = R::Blank() 
) const
inline

Returns a duplicate of this string padded to the left, using the specified fill character, up to the specified width.

See also
JustifyRight(), LeftJustified(), CenterJustified()

Definition at line 3567 of file String.h.

◆ SecureFill()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::SecureFill ( char  c = '\0')
inlinenoexcept

Securely fills this string and all instances sharing its string data with the specified character c.

If no filling character c is specified, the string will be filled with zeros, or null characters.

The normal data sharing mechanism is ignored on purpose by this function, so if there are other objects sharing the same string data, all of them will be affected unconditionally after calling this function.

This function is useful to ensure that sensitive data, such as user passwords and user names, are destroyed without the risk of surviving duplicates as a result of implicit data sharing.

Note
If the specified filling character c is zero, or the null character (the default value), the internal string pointer will be seen as an empty string by C library routines (such as strlen or strcpy) and other applications after calling this function, although it will continue storing the same allocated data block.

Definition at line 1425 of file String.h.

Referenced by pcl::AES256::AES256().

◆ SetAllocator()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::SetAllocator ( const allocator a)
inline

Sets the allocator object used by this string to a copy of the specified allocator a.

If this string is not unique, it is made unique before returning from this member function.

See also
Allocator()

Definition at line 846 of file String.h.

◆ SetLength()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::SetLength ( size_type  n)
inline

Causes this string to have the specified length n in characters.

If n is zero, this function calls Clear() to empty the string. Otherwise the string data will be shrunk or extended, and possibly reallocated. If the resulting string is larger than the original, newly allocated or reserved characters won't be initialized and will have unpredictable values; in this case it is the caller's responsibility to write them as appropriate.

After calling this member function, this object is guaranteed to uniquely reference its string data.

Definition at line 1482 of file String.h.

Referenced by pcl::GenericString< char, IsoCharTraits, PCL_STRING_ALLOCATOR >::SetToLength(), and pcl::IsoString::ToString().

◆ SetToLength()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
GenericString pcl::GenericString< T, R, A >::SetToLength ( size_type  n) const
inline

Returns a copy of this string resized to have the specified length n in characters. This function is a wrapper for SetLength(); see that function for important information.

Definition at line 1512 of file String.h.

◆ SingleQuoted()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
GenericString pcl::GenericString< T, R, A >::SingleQuoted ( ) const
inline

Returns a duplicate of this string enclosed by single quote characters ('). If this string is already single quoted, this function returns an unmodified copy.

See also
EnsureSingleQuoted()

Definition at line 3413 of file String.h.

◆ Size()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
size_type pcl::GenericString< T, R, A >::Size ( ) const
inlinenoexcept

Returns the total number of bytes required to store the string data referenced by this string, excluding the terminating null character.

See also
Length(), Capacity()

Definition at line 726 of file String.h.

◆ Sort() [1/2]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::Sort ( )
inline

Sorts the characters of this string in ascending order.

Definition at line 4051 of file String.h.

Referenced by pcl::GenericString< char, IsoCharTraits, PCL_STRING_ALLOCATOR >::Sorted().

◆ Sort() [2/2]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
template<class BP >
void pcl::GenericString< T, R, A >::Sort ( BP  p)
inline

Sorts the characters of this string in ascending order. Ordering is defined such that for any pair a, b of characters, the specified binary predicate p( a, b ) is true if a precedes b.

Definition at line 4077 of file String.h.

◆ Sorted() [1/2]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
GenericString pcl::GenericString< T, R, A >::Sorted ( ) const
inline

Returns a duplicate of this string with its characters sorted in ascending order.

Definition at line 4064 of file String.h.

◆ Sorted() [2/2]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
template<class BP >
GenericString pcl::GenericString< T, R, A >::Sorted ( BP  p) const
inline

Returns a duplicate of this string with its characters sorted in ascending order with the specified binary predicate p.

Definition at line 4091 of file String.h.

◆ Squeeze()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::Squeeze ( )
inline

Causes this string to allocate the exact required memory space to store its contained characters, plus a terminating null character.

If the string has excess capacity, a new copy of its existing characters is generated and stored in a newly allocated memory block that fits them exactly, then the previous memory block is deallocated.

If the string is empty, calling this function is equivalent to Clear(). Note that in this case a previously allocated memory block (by a call to Reserve()) may also be deallocated.

Definition at line 1556 of file String.h.

Referenced by pcl::GenericString< char, IsoCharTraits, PCL_STRING_ALLOCATOR >::Squeezed().

◆ Squeezed()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
GenericString pcl::GenericString< T, R, A >::Squeezed ( ) const
inline

Returns a copy of this string allocated to the exact required memory space to store its contained characters and a terminating null character.

Definition at line 1587 of file String.h.

◆ StartsWith() [1/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
template<class R1 , class A1 >
bool pcl::GenericString< T, R, A >::StartsWith ( const GenericString< T, R1, A1 > &  s) const
inlinenoexcept

Returns true iff this string begins with the specified substring s.

Definition at line 2805 of file String.h.

Referenced by pcl::FITSHeaderKeyword::IsString().

◆ StartsWith() [2/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
bool pcl::GenericString< T, R, A >::StartsWith ( const_c_string  t) const
inlinenoexcept

Returns true iff this string begins with the specified null-terminated sequence t.

Definition at line 2819 of file String.h.

◆ StartsWith() [3/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
bool pcl::GenericString< T, R, A >::StartsWith ( char_type  c) const
inlinenoexcept

Returns true iff this string begins with the specified character c.

Definition at line 2833 of file String.h.

◆ StartsWithIC() [1/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
template<class R1 , class A1 >
bool pcl::GenericString< T, R, A >::StartsWithIC ( const GenericString< T, R1, A1 > &  s) const
inlinenoexcept

Returns true iff this string begins with the specified substring s, performing case-insensitive character comparisons.

Definition at line 2843 of file String.h.

◆ StartsWithIC() [2/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
bool pcl::GenericString< T, R, A >::StartsWithIC ( const_c_string  t) const
inlinenoexcept

Returns true iff this string begins with the specified null-terminated sequence t, performing case-insensitive character comparisons.

Definition at line 2857 of file String.h.

◆ StartsWithIC() [3/3]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
bool pcl::GenericString< T, R, A >::StartsWithIC ( char_type  c) const
inlinenoexcept

Returns true iff this string begins with the specified character c, performing a case-insensitive character comparison.

Definition at line 2872 of file String.h.

◆ Substring()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
GenericString pcl::GenericString< T, R, A >::Substring ( size_type  i,
size_type  n = maxPos 
) const
inline

Returns a string with a copy of at most n contiguous characters starting at the i-th character in this string.

Definition at line 2252 of file String.h.

Referenced by pcl::GenericString< char, IsoCharTraits, PCL_STRING_ALLOCATOR >::Assign().

◆ Suffix()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
GenericString pcl::GenericString< T, R, A >::Suffix ( size_type  i) const
inline

Returns the suffix of this string starting at index i. Calling this member function is equivalent to:

Right( Length()-i )

Definition at line 2323 of file String.h.

◆ Swap()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::Swap ( GenericString< T, R, A > &  s)
inlinenoexcept

Exchanges this string with another string s.

Definition at line 1343 of file String.h.

◆ ToCaseFolded()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::ToCaseFolded ( )
inline

Replaces all characters in this string with their case folded counterparts.

Definition at line 3952 of file String.h.

Referenced by pcl::GenericString< char, IsoCharTraits, PCL_STRING_ALLOCATOR >::CaseFolded().

◆ ToLowercase()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::ToLowercase ( )
inline

Replaces all uppercase characters in this string with their lowercase counterparts.

Definition at line 3966 of file String.h.

Referenced by pcl::GenericString< char, IsoCharTraits, PCL_STRING_ALLOCATOR >::Lowercase().

◆ ToUppercase()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::ToUppercase ( )
inline

Replaces all lowercase characters in this string with their uppercase counterparts.

Definition at line 3980 of file String.h.

Referenced by pcl::GenericString< char, IsoCharTraits, PCL_STRING_ALLOCATOR >::Uppercase().

◆ Transfer() [1/2]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::Transfer ( GenericString< T, R, A > &  s)
inline

Transfers data from another object s to this string.

Decrements the reference counter of the current string data. If the data becomes unreferenced, it is destroyed and deallocated. The string data referenced by the source object s is then transferred to this object.

Warning
The source string s will be an invalid object after calling this function, and hence should be destroyed immediately. Any attempt to access an invalid object will most likely lead to a crash.
See also
Assign()

Definition at line 1189 of file String.h.

◆ Transfer() [2/2]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::Transfer ( GenericString< T, R, A > &&  s)
inline

Transfers data from another object s to this string.

See Transfer( GenericString& ) for detailed information.

Definition at line 1201 of file String.h.

◆ Trim()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::Trim ( )
inline

Removes all leading and trailing trimable characters.

Trimable characters are determined by the traits class R. A character c is trimable if R::IsTrimable( c ) is true. Generally, the set of trimable characters corresponds to the set of white space characters.

See also
Trimmed();

Definition at line 3263 of file String.h.

Referenced by pcl::FITSHeaderKeyword::Trim(), and pcl::GenericString< char, IsoCharTraits, PCL_STRING_ALLOCATOR >::Trimmed().

◆ TrimLeft()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::TrimLeft ( )
inline

Removes all leading trimable characters.

Trimable characters are determined by the traits class R. A character c is trimable if R::IsTrimable( c ) is true. Generally, the set of trimable characters corresponds to the set of white space characters.

See also
TrimmedLeft();

Definition at line 3280 of file String.h.

Referenced by pcl::GenericString< char, IsoCharTraits, PCL_STRING_ALLOCATOR >::TrimmedLeft().

◆ Trimmed()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
GenericString pcl::GenericString< T, R, A >::Trimmed ( ) const
inline

Returns a duplicate of this string with all leading and trailing trimable characters removed.

See also
Trim()

Definition at line 3308 of file String.h.

◆ TrimmedLeft()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
GenericString pcl::GenericString< T, R, A >::TrimmedLeft ( ) const
inline

Returns a duplicate of this string with all leading trimable characters removed.

See also
TrimLeft()

Definition at line 3320 of file String.h.

◆ TrimmedRight()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
GenericString pcl::GenericString< T, R, A >::TrimmedRight ( ) const
inline

Returns a duplicate of this string with all trailing trimable characters removed.

See also
TrimRight()

Definition at line 3332 of file String.h.

◆ TrimRight()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::TrimRight ( )
inline

Removes all trailing trimable characters.

Trimable characters are determined by the traits class R. A character c is trimable if R::IsTrimable( c ) is true. Generally, the set of trimable characters corresponds to the set of white space characters.

See also
TrimmedRight();

Definition at line 3296 of file String.h.

Referenced by pcl::GenericString< char, IsoCharTraits, PCL_STRING_ALLOCATOR >::TrimmedRight().

◆ Unquote()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
void pcl::GenericString< T, R, A >::Unquote ( )
inline

Unquotes this string.

If the string starts and ends with single quote characters, the result is the same string with the quotes removed and its length decremented by two. The same happens if the string starts and ends with double quote characters.

If the string does not start and end with the same quote character, this function has no effect.

See also
Unquoted()

Definition at line 3457 of file String.h.

Referenced by pcl::GenericString< char, IsoCharTraits, PCL_STRING_ALLOCATOR >::Unquoted().

◆ Unquoted()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
GenericString pcl::GenericString< T, R, A >::Unquoted ( ) const
inline

Returns an unquoted duplicate of this string.

See also
Unquote()

Definition at line 3481 of file String.h.

◆ UpperBound()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
size_type pcl::GenericString< T, R, A >::UpperBound ( ) const
inlinenoexcept

Returns the maximum valid character index.

The returned value is equal to Length()-1. If this string is empty, the index returned by this member function is invalid and equal to maxPos.

See also
LowerBound(), Length()

Definition at line 821 of file String.h.

◆ Uppercase()

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
GenericString pcl::GenericString< T, R, A >::Uppercase ( ) const
inline

Returns a duplicate of this string with all lowercase characters replaced with their uppercase counterparts.

Definition at line 4016 of file String.h.

◆ WildMatch() [1/2]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
template<class R1 , class A1 >
bool pcl::GenericString< T, R, A >::WildMatch ( const GenericString< T, R1, A1 > &  pattern,
bool  caseSensitive = true 
) const
inlinenoexcept

Wildcard string matching.

Parameters
patternThe pattern string. May contain multiple instances of the wildcard characters '*' and '?'.
caseSensitiveWhen true, a case-sensitive comparison is performed; otherwise the comparison does not distinguish between lowercase and uppercase characters. The default value is true.

Returns true iff this string matches the specified pattern. If either this string or the pattern is empty, this function always returns false conventionally, even if the pattern is a single asterisk '*'.

Definition at line 3873 of file String.h.

◆ WildMatch() [2/2]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
bool pcl::GenericString< T, R, A >::WildMatch ( const_c_string  pattern,
bool  caseSensitive = true 
) const
inlinenoexcept

Wildcard string matching with a null-terminated pattern.

Parameters
patternThe pattern string. May contain multiple instances of the wildcard characters '*' and '?'.
caseSensitiveWhen true, a case-sensitive comparison is performed; otherwise the comparison does not distinguish between lowercase and uppercase characters. The default value is true.

Returns true iff this string matches the specified pattern. If either this string or the pattern is empty, this function always returns false conventionally, even if the pattern is a single asterisk '*'.

Definition at line 3912 of file String.h.

◆ WildMatchIC() [1/2]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
template<class R1 , class A1 >
bool pcl::GenericString< T, R, A >::WildMatchIC ( const GenericString< T, R1, A1 > &  pattern) const
inlinenoexcept

Wildcard string matching (case-insensitive).

Parameters
patternThe pattern string. May contain multiple instances of the wildcard characters '*' and '?'.

This function performs case-insensitive comparisons between string and non-wild pattern characters.

Returns true iff this string matches the specified pattern. If either this string or the pattern is empty, this function always returns false conventionally, even if the pattern is a single asterisk '*'.

Definition at line 3892 of file String.h.

◆ WildMatchIC() [2/2]

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
bool pcl::GenericString< T, R, A >::WildMatchIC ( const_c_string  pattern) const
inlinenoexcept

Wildcard string matching with a null-terminated pattern (case-insensitive).

Parameters
patternThe pattern string. May contain multiple instances of the wildcard characters '*' and '?'.

This function performs case-insensitive comparisons between string and non-wild pattern characters.

Returns true iff this string matches the specified pattern. If either this string or the pattern is empty, this function always returns false conventionally, even if the pattern is a single asterisk '*'.

Definition at line 3931 of file String.h.

Member Data Documentation

◆ maxPos

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
const size_type pcl::GenericString< T, R, A >::maxPos = ~size_type( 0 )
static

Corresponds to the maximum possible character index in a string.

Definition at line 533 of file String.h.

◆ notFound

template<class T, class R, class A = PCL_STRING_ALLOCATOR>
const size_type pcl::GenericString< T, R, A >::notFound = ~size_type( 0 )
static

Constant used to signal unsuccessful search operations.

Definition at line 528 of file String.h.


The documentation for this class was generated from the following file: