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)
 
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
 
size_type Available () const
 
iterator Begin ()
 
const_iterator Begin () const
 
iterator begin ()
 
const_iterator begin () const
 
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
 
const_c_string c_str () const
 
size_type Capacity () const
 
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
 
int Compare (const_c_string t, bool caseSensitive=true, bool localeAware=true) const
 
int Compare (char_type c, bool caseSensitive=true, bool localeAware=true) const
 
template<class R1 , class A1 >
int CompareCodePoints (const GenericString< T, R1, A1 > &s, bool caseSensitive=true) const
 
int CompareCodePoints (const_c_string t, bool caseSensitive=true) const
 
int CompareCodePoints (char_type c, bool caseSensitive=true) const
 
template<class R1 , class A1 >
int CompareIC (const GenericString< T, R1, A1 > &s, bool localeAware=true) const
 
int CompareIC (const_c_string t, bool localeAware=true) const
 
int CompareIC (char_type c, bool localeAware=true) const
 
template<class R1 , class A1 >
bool Contains (const GenericString< T, R1, A1 > &s) const
 
bool Contains (const_c_string t) const
 
bool Contains (char_type c) const
 
template<class R1 , class A1 >
bool ContainsIC (const GenericString< T, R1, A1 > &s) const
 
bool ContainsIC (const_c_string t) const
 
bool ContainsIC (char_type c) const
 
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
 
iterator end ()
 
const_iterator end () const
 
template<class R1 , class A1 >
bool EndsWith (const GenericString< T, R1, A1 > &s) const
 
bool EndsWith (const_c_string t) const
 
bool EndsWith (char_type c) const
 
template<class R1 , class A1 >
bool EndsWithIC (const GenericString< T, R1, A1 > &s) const
 
bool EndsWithIC (const_c_string t) const
 
bool EndsWithIC (char_type c) const
 
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
 
size_type Find (const_c_string t, size_type i=0) const
 
size_type Find (char_type c, size_type i=0) const
 
template<class R1 , class A1 >
size_type FindFirst (const GenericString< T, R1, A1 > &s, size_type i=0) const
 
size_type FindFirst (const_c_string t, size_type i=0) const
 
size_type FindFirst (char_type c, size_type i=0) const
 
template<class R1 , class A1 >
size_type FindFirstIC (const GenericString< T, R1, A1 > &s, size_type i=0) const
 
size_type FindFirstIC (const_c_string t, size_type i=0) const
 
size_type FindFirstIC (char_type c, size_type i=0) const
 
template<class R1 , class A1 >
size_type FindIC (const GenericString< T, R1, A1 > &s, size_type i=0) const
 
size_type FindIC (const_c_string t, size_type i=0) const
 
size_type FindIC (char_type c, size_type i=0) const
 
template<class R1 , class A1 >
size_type FindLast (const GenericString< T, R1, A1 > &s, size_type r=maxPos) const
 
size_type FindLast (const_c_string t, size_type r=maxPos) const
 
size_type FindLast (char_type c, size_type r=maxPos) const
 
template<class R1 , class A1 >
size_type FindLastIC (const GenericString< T, R1, A1 > &s, size_type r=maxPos) const
 
size_type FindLastIC (const_c_string t, size_type r=maxPos) const
 
size_type FindLastIC (char_type c, size_type r=maxPos) const
 
char_type FirstChar () const
 
const allocatorGetAllocator () const
 
uint64 Hash (uint64 seed=0) const
 
uint32 Hash32 (uint32 seed=0) const
 
uint64 Hash64 (uint64 seed=0) const
 
bool HasWildcards () const
 
size_type IndexAt (const_iterator i) const
 
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
 
bool IsEmpty () const
 
bool IsNumeral () const
 
bool IsSymbol () const
 
bool IsUnique () const
 
bool IsValid () const
 
bool IsValidIdentifier (distance_type &pos) const
 
bool IsValidIdentifier () const
 
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
 
GenericString Left (size_type n) const
 
GenericString LeftJustified (size_type width, char_type fill=R::Blank()) const
 
size_type Length () const
 
size_type LowerBound () const
 
GenericString Lowercase () const
 
char_typeoperator* ()
 
char_type operator* () const
 
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
 
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
 
GenericString Reversed () const
 
reverse_iterator ReverseEnd ()
 
const_reverse_iterator ReverseEnd () const
 
GenericString Right (size_type n) const
 
GenericString RightJustified (size_type width, char_type fill=R::Blank()) const
 
void SecureFill (char c='\0')
 
void SetAllocator (const allocator &a)
 
void SetLength (size_type n)
 
GenericString SetToLength (size_type n) const
 
GenericString SingleQuoted () const
 
size_type Size () const
 
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
 
bool StartsWith (const_c_string t) const
 
bool StartsWith (char_type c) const
 
template<class R1 , class A1 >
bool StartsWithIC (const GenericString< T, R1, A1 > &s) const
 
bool StartsWithIC (const_c_string t) const
 
bool StartsWithIC (char_type c) const
 
GenericString Substring (size_type i, size_type n=maxPos) const
 
GenericString Suffix (size_type i) const
 
void Swap (GenericString &s)
 
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
 
GenericString Uppercase () const
 
template<class R1 , class A1 >
bool WildMatch (const GenericString< T, R1, A1 > &pattern, bool caseSensitive=true) const
 
bool WildMatch (const_c_string pattern, bool caseSensitive=true) const
 
template<class R1 , class A1 >
bool WildMatchIC (const GenericString< T, R1, A1 > &pattern) const
 
bool WildMatchIC (const_c_string pattern) const
 

Static Public Member Functions

static size_type BytesPerChar ()
 
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 = StandardAllocator>
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 460 of file String.h.

Member Typedef Documentation

◆ allocator

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

The allocator class used by this string class.

Definition at line 482 of file String.h.

◆ block_allocator

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

The block allocator used by this string class.

Definition at line 477 of file String.h.

◆ c_string

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

Null-terminated string of char_type characters.

Definition at line 487 of file String.h.

◆ char_traits

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

The character traits class used by this string class.

Definition at line 472 of file String.h.

◆ char_type

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

Represents a string character.

Definition at line 467 of file String.h.

◆ const_c_string

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

Immutable null-terminated string of char_type characters.

Definition at line 492 of file String.h.

◆ const_iterator

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

Immutable string iterator.

Definition at line 502 of file String.h.

◆ const_reverse_iterator

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

Reverse immutable string iterator.

Definition at line 514 of file String.h.

◆ iterator

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

String iterator.

Definition at line 497 of file String.h.

◆ reverse_iterator

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

Reverse string iterator.

Definition at line 508 of file String.h.

Constructor & Destructor Documentation

◆ GenericString() [1/8]

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

Constructs an empty string.

Definition at line 533 of file String.h.

◆ GenericString() [2/8]

template<class T, class R, class A = StandardAllocator>
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 541 of file String.h.

◆ GenericString() [3/8]

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

Move constructor.

Definition at line 549 of file String.h.

◆ GenericString() [4/8]

template<class T, class R, class A = StandardAllocator>
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 558 of file String.h.

◆ GenericString() [5/8]

template<class T, class R, class A = StandardAllocator>
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 587 of file String.h.

◆ GenericString() [6/8]

template<class T, class R, class A = StandardAllocator>
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 607 of file String.h.

◆ GenericString() [7/8]

template<class T, class R, class A = StandardAllocator>
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 615 of file String.h.

◆ GenericString() [8/8]

template<class T, class R, class A = StandardAllocator>
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 630 of file String.h.

◆ ~GenericString()

template<class T, class R, class A = StandardAllocator>
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 645 of file String.h.

Member Function Documentation

◆ Add() [1/5]

template<class T, class R, class A = StandardAllocator>
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 1783 of file String.h.

◆ Add() [2/5]

template<class T, class R, class A = StandardAllocator>
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 1792 of file String.h.

◆ Add() [3/5]

template<class T, class R, class A = StandardAllocator>
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 1801 of file String.h.

◆ Add() [4/5]

template<class T, class R, class A = StandardAllocator>
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 1810 of file String.h.

◆ Add() [5/5]

template<class T, class R, class A = StandardAllocator>
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 1819 of file String.h.

◆ Append() [1/5]

template<class T, class R, class A = StandardAllocator>
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 1715 of file String.h.

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

◆ Append() [2/5]

template<class T, class R, class A = StandardAllocator>
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 1738 of file String.h.

◆ Append() [3/5]

template<class T, class R, class A = StandardAllocator>
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 1747 of file String.h.

◆ Append() [4/5]

template<class T, class R, class A = StandardAllocator>
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 1755 of file String.h.

◆ Append() [5/5]

template<class T, class R, class A = StandardAllocator>
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 1773 of file String.h.

◆ Assign() [1/7]

template<class T, class R, class A = StandardAllocator>
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 1148 of file String.h.

◆ Assign() [2/7]

template<class T, class R, class A = StandardAllocator>
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 1222 of file String.h.

◆ Assign() [3/7]

template<class T, class R, class A = StandardAllocator>
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 1234 of file String.h.

◆ Assign() [4/7]

template<class T, class R, class A = StandardAllocator>
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 1266 of file String.h.

◆ Assign() [5/7]

template<class T, class R, class A = StandardAllocator>
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 1284 of file String.h.

◆ Assign() [6/7]

template<class T, class R, class A = StandardAllocator>
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 1302 of file String.h.

◆ Assign() [7/7]

template<class T, class R, class A = StandardAllocator>
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 1319 of file String.h.

◆ At() [1/2]

template<class T, class R, class A = StandardAllocator>
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 854 of file String.h.

◆ At() [2/2]

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

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 870 of file String.h.

◆ Available()

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

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 752 of file String.h.

◆ Begin() [1/2]

template<class T, class R, class A = StandardAllocator>
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 943 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 = StandardAllocator>
const_iterator pcl::GenericString< T, R, A >::Begin ( ) const
inline

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 957 of file String.h.

◆ begin() [1/2]

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

STL-compatible iteration. Equivalent to Begin().

Definition at line 1080 of file String.h.

◆ begin() [2/2]

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

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

Definition at line 1088 of file String.h.

◆ Break() [1/4]

template<class T, class R, class A = StandardAllocator>
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 2347 of file String.h.

◆ Break() [2/4]

template<class T, class R, class A = StandardAllocator>
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 2407 of file String.h.

◆ Break() [3/4]

template<class T, class R, class A = StandardAllocator>
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 2467 of file String.h.

◆ Break() [4/4]

template<class T, class R, class A = StandardAllocator>
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 2532 of file String.h.

◆ BreakIC() [1/3]

template<class T, class R, class A = StandardAllocator>
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 2599 of file String.h.

◆ BreakIC() [2/3]

template<class T, class R, class A = StandardAllocator>
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 2665 of file String.h.

◆ BreakIC() [3/3]

template<class T, class R, class A = StandardAllocator>
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 2730 of file String.h.

◆ BytesPerChar()

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

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 705 of file String.h.

◆ c_copy()

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

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 1621 of file String.h.

◆ c_str()

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

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 1117 of file String.h.

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

◆ Capacity()

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

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 740 of file String.h.

◆ CaseFolded()

template<class T, class R, class A = StandardAllocator>
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 3984 of file String.h.

◆ CenterJustified()

template<class T, class R, class A = StandardAllocator>
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 3570 of file String.h.

◆ Clear()

template<class T, class R, class A = StandardAllocator>
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 2225 of file String.h.

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

◆ Compare() [1/3]

template<class T, class R, class A = StandardAllocator>
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
inline

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 3694 of file String.h.

◆ Compare() [2/3]

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

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 3727 of file String.h.

◆ Compare() [3/3]

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

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 3761 of file String.h.

◆ CompareCodePoints() [1/3]

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

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 3601 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 = StandardAllocator>
int pcl::GenericString< T, R, A >::CompareCodePoints ( const_c_string  t,
bool  caseSensitive = true 
) const
inline

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 3630 of file String.h.

◆ CompareCodePoints() [3/3]

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

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 3662 of file String.h.

◆ CompareIC() [1/3]

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

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 3787 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 = StandardAllocator>
int pcl::GenericString< T, R, A >::CompareIC ( const_c_string  t,
bool  localeAware = true 
) const
inline

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 3813 of file String.h.

◆ CompareIC() [3/3]

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

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 3842 of file String.h.

◆ Contains() [1/3]

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

Returns true iff this string contains a substring s.

Definition at line 3189 of file String.h.

◆ Contains() [2/3]

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

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

Definition at line 3197 of file String.h.

◆ Contains() [3/3]

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

Returns true iff this string contains a character c.

Definition at line 3205 of file String.h.

◆ ContainsIC() [1/3]

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

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 3217 of file String.h.

◆ ContainsIC() [2/3]

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

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 3228 of file String.h.

◆ ContainsIC() [3/3]

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

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 3239 of file String.h.

◆ Delete()

template<class T, class R, class A = StandardAllocator>
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 2096 of file String.h.

◆ DeleteChar()

template<class T, class R, class A = StandardAllocator>
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 2153 of file String.h.

◆ DeleteCharIC()

template<class T, class R, class A = StandardAllocator>
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 2165 of file String.h.

◆ DeleteFreeList()

template<class T, class R, class A = StandardAllocator>
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 4233 of file String.h.

◆ DeleteLeft()

template<class T, class R, class A = StandardAllocator>
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 2143 of file String.h.

◆ DeleteRight()

template<class T, class R, class A = StandardAllocator>
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 2134 of file String.h.

◆ DeleteString() [1/2]

template<class T, class R, class A = StandardAllocator>
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 2176 of file String.h.

◆ DeleteString() [2/2]

template<class T, class R, class A = StandardAllocator>
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 2186 of file String.h.

◆ DeleteStringIC() [1/2]

template<class T, class R, class A = StandardAllocator>
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 2199 of file String.h.

◆ DeleteStringIC() [2/2]

template<class T, class R, class A = StandardAllocator>
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 2211 of file String.h.

◆ DoubleQuoted()

template<class T, class R, class A = StandardAllocator>
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 3427 of file String.h.

◆ Enclosed()

template<class T, class R, class A = StandardAllocator>
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 3379 of file String.h.

◆ End() [1/2]

template<class T, class R, class A = StandardAllocator>
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 973 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 = StandardAllocator>
const_iterator pcl::GenericString< T, R, A >::End ( ) const
inline

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 987 of file String.h.

◆ end() [1/2]

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

STL-compatible iteration. Equivalent to End().

Definition at line 1096 of file String.h.

◆ end() [2/2]

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

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

Definition at line 1104 of file String.h.

◆ EndsWith() [1/3]

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

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

Definition at line 2871 of file String.h.

◆ EndsWith() [2/3]

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

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

Definition at line 2886 of file String.h.

◆ EndsWith() [3/3]

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

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

Definition at line 2900 of file String.h.

◆ EndsWithIC() [1/3]

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

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

Definition at line 2910 of file String.h.

◆ EndsWithIC() [2/3]

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

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

Definition at line 2925 of file String.h.

◆ EndsWithIC() [3/3]

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

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

Definition at line 2940 of file String.h.

◆ EnsureDoubleQuoted()

template<class T, class R, class A = StandardAllocator>
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 3416 of file String.h.

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

◆ EnsureEnclosed()

template<class T, class R, class A = StandardAllocator>
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 3335 of file String.h.

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

◆ EnsureSingleQuoted()

template<class T, class R, class A = StandardAllocator>
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 3392 of file String.h.

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

◆ EnsureUnique()

template<class T, class R, class A = StandardAllocator>
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 685 of file String.h.

◆ Fill() [1/2]

template<class T, class R, class A = StandardAllocator>
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 1347 of file String.h.

◆ Fill() [2/2]

template<class T, class R, class A = StandardAllocator>
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 1376 of file String.h.

◆ Find() [1/3]

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

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

Definition at line 3035 of file String.h.

◆ Find() [2/3]

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

A synonym for FindFirst( const_c_string, size_type ).

Definition at line 3043 of file String.h.

◆ Find() [3/3]

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

A synonym for FindFirst( char_type, size_type ).

Definition at line 3051 of file String.h.

◆ FindFirst() [1/3]

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

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 2951 of file String.h.

◆ FindFirst() [2/3]

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

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 2963 of file String.h.

◆ FindFirst() [3/3]

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

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 2975 of file String.h.

◆ FindFirstIC() [1/3]

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

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 2992 of file String.h.

◆ FindFirstIC() [2/3]

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

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 3007 of file String.h.

◆ FindFirstIC() [3/3]

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

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 3022 of file String.h.

◆ FindIC() [1/3]

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

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

Definition at line 3060 of file String.h.

◆ FindIC() [2/3]

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

A synonym for FindFirstIC( const_c_string, size_type ).

Definition at line 3068 of file String.h.

◆ FindIC() [3/3]

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

A synonym for FindFirstIC( char_type, size_type ).

Definition at line 3076 of file String.h.

◆ FindLast() [1/3]

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

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 3091 of file String.h.

◆ FindLast() [2/3]

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

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 3107 of file String.h.

◆ FindLast() [3/3]

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

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 3119 of file String.h.

◆ FindLastIC() [1/3]

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

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 3141 of file String.h.

◆ FindLastIC() [2/3]

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

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 3160 of file String.h.

◆ FindLastIC() [3/3]

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

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 3175 of file String.h.

◆ FirstChar()

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

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

Definition at line 2777 of file String.h.

◆ GetAllocator()

template<class T, class R, class A = StandardAllocator>
const allocator& pcl::GenericString< T, R, A >::GetAllocator ( ) const
inline

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

See also
SetAllocator()

Definition at line 822 of file String.h.

◆ Hash()

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

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

Definition at line 4221 of file String.h.

◆ Hash32()

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

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 4212 of file String.h.

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

◆ Hash64()

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

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 4199 of file String.h.

◆ HasWildcards()

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

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

Definition at line 3930 of file String.h.

◆ IndexAt()

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

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 1070 of file String.h.

◆ Insert() [1/5]

template<class T, class R, class A = StandardAllocator>
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 1645 of file String.h.

◆ Insert() [2/5]

template<class T, class R, class A = StandardAllocator>
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 1662 of file String.h.

◆ Insert() [3/5]

template<class T, class R, class A = StandardAllocator>
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 1676 of file String.h.

◆ Insert() [4/5]

template<class T, class R, class A = StandardAllocator>
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 1690 of file String.h.

◆ Insert() [5/5]

template<class T, class R, class A = StandardAllocator>
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 1702 of file String.h.

◆ IsAliasOf()

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

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 671 of file String.h.

◆ IsEmpty()

◆ IsNumeral()

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

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 4102 of file String.h.

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

◆ IsSymbol()

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

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 4124 of file String.h.

◆ IsUnique()

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

Returns true iff this string uniquely references its string data.

See also
EnsureUnique(), IsAliasOf()

Definition at line 659 of file String.h.

◆ IsValid()

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

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 773 of file String.h.

◆ IsValidIdentifier() [1/2]

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

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 4147 of file String.h.

◆ IsValidIdentifier() [2/2]

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

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 4178 of file String.h.

◆ JustifyCenter()

template<class T, class R, class A = StandardAllocator>
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 3526 of file String.h.

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

◆ JustifyLeft()

template<class T, class R, class A = StandardAllocator>
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 3489 of file String.h.

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

◆ JustifyRight()

template<class T, class R, class A = StandardAllocator>
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 3507 of file String.h.

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

◆ LastChar()

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

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

Definition at line 2786 of file String.h.

◆ Left()

template<class T, class R, class A = StandardAllocator>
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 2267 of file String.h.

◆ LeftJustified()

template<class T, class R, class A = StandardAllocator>
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 3544 of file String.h.

◆ Length()

◆ LowerBound()

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

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 798 of file String.h.

◆ Lowercase()

template<class T, class R, class A = StandardAllocator>
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 3995 of file String.h.

◆ operator*() [1/2]

template<class T, class R, class A = StandardAllocator>
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 914 of file String.h.

◆ operator*() [2/2]

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

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 927 of file String.h.

◆ operator+=() [1/3]

template<class T, class R, class A = StandardAllocator>
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 1725 of file String.h.

◆ operator+=() [2/3]

template<class T, class R, class A = StandardAllocator>
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 1764 of file String.h.

◆ operator+=() [3/3]

template<class T, class R, class A = StandardAllocator>
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 1828 of file String.h.

◆ operator-=() [1/3]

template<class T, class R, class A = StandardAllocator>
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 1849 of file String.h.

◆ operator-=() [2/3]

template<class T, class R, class A = StandardAllocator>
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 1889 of file String.h.

◆ operator-=() [3/3]

template<class T, class R, class A = StandardAllocator>
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 1907 of file String.h.

◆ operator=() [1/4]

template<class T, class R, class A = StandardAllocator>
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 1128 of file String.h.

◆ operator=() [2/4]

template<class T, class R, class A = StandardAllocator>
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 1160 of file String.h.

◆ operator=() [3/4]

template<class T, class R, class A = StandardAllocator>
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 1202 of file String.h.

◆ operator=() [4/4]

template<class T, class R, class A = StandardAllocator>
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 1212 of file String.h.

◆ operator[]() [1/2]

template<class T, class R, class A = StandardAllocator>
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 888 of file String.h.

◆ operator[]() [2/2]

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

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 902 of file String.h.

◆ Prefix()

template<class T, class R, class A = StandardAllocator>
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 2324 of file String.h.

◆ Prepend() [1/5]

template<class T, class R, class A = StandardAllocator>
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 1839 of file String.h.

Referenced by pcl::operator+().

◆ Prepend() [2/5]

template<class T, class R, class A = StandardAllocator>
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 1862 of file String.h.

◆ Prepend() [3/5]

template<class T, class R, class A = StandardAllocator>
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 1871 of file String.h.

◆ Prepend() [4/5]

template<class T, class R, class A = StandardAllocator>
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 1880 of file String.h.

◆ Prepend() [5/5]

template<class T, class R, class A = StandardAllocator>
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 1898 of file String.h.

◆ Release()

template<class T, class R, class A = StandardAllocator>
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 1597 of file String.h.

◆ Replace() [1/3]

template<class T, class R, class A = StandardAllocator>
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 1918 of file String.h.

◆ Replace() [2/3]

template<class T, class R, class A = StandardAllocator>
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 1957 of file String.h.

◆ Replace() [3/3]

template<class T, class R, class A = StandardAllocator>
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 1992 of file String.h.

◆ ReplaceChar()

template<class T, class R, class A = StandardAllocator>
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 2027 of file String.h.

◆ ReplaceCharIC()

template<class T, class R, class A = StandardAllocator>
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 2039 of file String.h.

◆ ReplaceString() [1/2]

template<class T, class R, class A = StandardAllocator>
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 2050 of file String.h.

◆ ReplaceString() [2/2]

template<class T, class R, class A = StandardAllocator>
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 2061 of file String.h.

◆ ReplaceStringIC() [1/2]

template<class T, class R, class A = StandardAllocator>
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 2074 of file String.h.

◆ ReplaceStringIC() [2/2]

template<class T, class R, class A = StandardAllocator>
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 2087 of file String.h.

◆ Reserve()

template<class T, class R, class A = StandardAllocator>
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 1429 of file String.h.

◆ ResizedToNullTerminated()

template<class T, class R, class A = StandardAllocator>
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 1527 of file String.h.

◆ ResizeToNullTerminated()

template<class T, class R, class A = StandardAllocator>
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 1518 of file String.h.

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

◆ Reverse()

template<class T, class R, class A = StandardAllocator>
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 4018 of file String.h.

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

◆ ReverseBegin() [1/2]

template<class T, class R, class A = StandardAllocator>
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 1005 of file String.h.

◆ ReverseBegin() [2/2]

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

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 1021 of file String.h.

◆ Reversed()

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

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

Definition at line 4031 of file String.h.

◆ ReverseEnd() [1/2]

template<class T, class R, class A = StandardAllocator>
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 1039 of file String.h.

◆ ReverseEnd() [2/2]

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

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 1055 of file String.h.

◆ Right()

template<class T, class R, class A = StandardAllocator>
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 2289 of file String.h.

◆ RightJustified()

template<class T, class R, class A = StandardAllocator>
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 3557 of file String.h.

◆ SecureFill()

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

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 1415 of file String.h.

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

◆ SetAllocator()

template<class T, class R, class A = StandardAllocator>
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
GetAllocator()

Definition at line 836 of file String.h.

◆ SetLength()

template<class T, class R, class A = StandardAllocator>
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 1472 of file String.h.

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

◆ SetToLength()

template<class T, class R, class A = StandardAllocator>
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 1502 of file String.h.

◆ SingleQuoted()

template<class T, class R, class A = StandardAllocator>
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 3403 of file String.h.

◆ Size()

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

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 716 of file String.h.

◆ Sort() [1/2]

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

Sorts the characters of this string in ascending order.

Definition at line 4041 of file String.h.

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

◆ Sort() [2/2]

template<class T, class R, class A = StandardAllocator>
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 4067 of file String.h.

◆ Sorted() [1/2]

template<class T, class R, class A = StandardAllocator>
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 4054 of file String.h.

◆ Sorted() [2/2]

template<class T, class R, class A = StandardAllocator>
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 4081 of file String.h.

◆ Squeeze()

template<class T, class R, class A = StandardAllocator>
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 1546 of file String.h.

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

◆ Squeezed()

template<class T, class R, class A = StandardAllocator>
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 1577 of file String.h.

◆ StartsWith() [1/3]

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

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

Definition at line 2795 of file String.h.

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

◆ StartsWith() [2/3]

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

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

Definition at line 2809 of file String.h.

◆ StartsWith() [3/3]

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

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

Definition at line 2823 of file String.h.

◆ StartsWithIC() [1/3]

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

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

Definition at line 2833 of file String.h.

◆ StartsWithIC() [2/3]

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

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

Definition at line 2847 of file String.h.

◆ StartsWithIC() [3/3]

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

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

Definition at line 2862 of file String.h.

◆ Substring()

template<class T, class R, class A = StandardAllocator>
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 2242 of file String.h.

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

◆ Suffix()

template<class T, class R, class A = StandardAllocator>
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 2313 of file String.h.

◆ Swap()

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

Exchanges this string with another string s.

Definition at line 1333 of file String.h.

Referenced by pcl::Swap().

◆ ToCaseFolded()

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

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

Definition at line 3942 of file String.h.

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

◆ ToLowercase()

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

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

Definition at line 3956 of file String.h.

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

◆ ToUppercase()

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

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

Definition at line 3970 of file String.h.

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

◆ Transfer() [1/2]

template<class T, class R, class A = StandardAllocator>
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 1179 of file String.h.

◆ Transfer() [2/2]

template<class T, class R, class A = StandardAllocator>
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 1191 of file String.h.

◆ Trim()

template<class T, class R, class A = StandardAllocator>
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 3253 of file String.h.

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

◆ TrimLeft()

template<class T, class R, class A = StandardAllocator>
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 3270 of file String.h.

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

◆ Trimmed()

template<class T, class R, class A = StandardAllocator>
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 3298 of file String.h.

◆ TrimmedLeft()

template<class T, class R, class A = StandardAllocator>
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 3310 of file String.h.

◆ TrimmedRight()

template<class T, class R, class A = StandardAllocator>
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 3322 of file String.h.

◆ TrimRight()

template<class T, class R, class A = StandardAllocator>
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 3286 of file String.h.

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

◆ Unquote()

template<class T, class R, class A = StandardAllocator>
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 3447 of file String.h.

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

◆ Unquoted()

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

Returns an unquoted duplicate of this string.

See also
Unquote()

Definition at line 3471 of file String.h.

◆ UpperBound()

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

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 811 of file String.h.

◆ Uppercase()

template<class T, class R, class A = StandardAllocator>
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 4006 of file String.h.

◆ WildMatch() [1/2]

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

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 3863 of file String.h.

◆ WildMatch() [2/2]

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

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 3902 of file String.h.

◆ WildMatchIC() [1/2]

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

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 3882 of file String.h.

◆ WildMatchIC() [2/2]

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

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 3921 of file String.h.

Member Data Documentation

◆ maxPos

template<class T, class R, class A = StandardAllocator>
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 526 of file String.h.

◆ notFound

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

Constant used to signal unsuccessful search operations.

Definition at line 521 of file String.h.


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