Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::StringBuilder Class Reference

Unicode character string constructor. More...

#include </__w/arcaneframework.github.io/arcaneframework.github.io/framework/arccore/src/base/arccore/base/StringBuilder.h>

Collaboration diagram for Arcane::StringBuilder:

Public Member Functions

 StringBuilder ()
 Creates a null string.
 StringBuilder (const char *str)
 Creates a string from str in local encoding.
 StringBuilder (const char *str, Integer len)
 Creates a string from str in local encoding.
 StringBuilder (const std::string &str)
 Creates a string from str in local encoding.
 StringBuilder (const UCharConstArrayView &ustr)
 Creates a string from str in Utf16 encoding.
 StringBuilder (const ByteConstArrayView &ustr)
 Creates a string from str in Utf8 encoding.
 StringBuilder (const StringBuilder &str_builder)
 Creates a string from str_builder.
 StringBuilder (StringImpl *impl)
 Creates a string from str in local encoding.
 StringBuilder (const String &str)
 Creates a string from str.
const StringBuilderoperator= (const String &str)
 Copies str into this instance.
const StringBuilderoperator= (const char *str)
 Copies str into this instance.
const StringBuilderoperator= (const StringBuilder &str)
 Copies str into this instance.
 ~StringBuilder ()
 Releases resources.
 operator String () const
 Returns the constructed character string.
String toString () const
 Returns the constructed character string.
StringBuilderappend (const String &str)
 Appends str.
StringBuilder clone () const
 Clones this string.
StringBuilderreplaceWhiteSpace ()
 Performs whitespace character normalization. All whitespace characters are replaced by space characters #x20, namely #xD (Carriage Return), #xA (Line Feed), and #x9 (Tabulation). This corresponds to the xs:replace attribute of XMLSchema 1.0.
StringBuildercollapseWhiteSpace ()
 Performs whitespace character normalization. The behavior is identical to replaceWhiteSpace() plus:
StringBuildertoUpper ()
 Converts all characters in the string to uppercase.
StringBuildertoLower ()
 Converts all characters in the string to lowercase.
void operator+= (const char *str)
void operator+= (const String &str)
void operator+= (unsigned long v)
void operator+= (unsigned int v)
void operator+= (double v)
void operator+= (long double v)
void operator+= (int v)
void operator+= (char v)
void operator+= (long v)
void operator+= (unsigned long long v)
void operator+= (long long v)
void operator+= (const APReal &v)
void internalDump (std::ostream &ostr) const
 Displays internal class information.

Private Member Functions

void _checkClone () const

Private Attributes

StringImplm_p = nullptr
 Class implementation.
const char * m_const_ptr = nullptr

Friends

bool operator== (const StringBuilder &a, const StringBuilder &b)
bool operator!= (const StringBuilder &a, const StringBuilder &b)

Detailed Description

Unicode character string constructor.

Allows efficient construction of a character string by concatenation.

\not_thread_safe

Definition at line 47 of file arccore/src/base/arccore/base/StringBuilder.h.

Constructor & Destructor Documentation

◆ StringBuilder() [1/9]

Arcane::StringBuilder::StringBuilder ( )
inline

Creates a null string.

Definition at line 52 of file arccore/src/base/arccore/base/StringBuilder.h.

References m_p.

Referenced by append(), clone(), collapseWhiteSpace(), operator=(), operator=(), operator=(), replaceWhiteSpace(), StringBuilder(), toLower(), and toUpper().

Here is the caller graph for this function:

◆ StringBuilder() [2/9]

Arcane::StringBuilder::StringBuilder ( const char * str)

Creates a string from str in local encoding.

Definition at line 79 of file StringBuilder.cc.

References m_p.

◆ StringBuilder() [3/9]

Arcane::StringBuilder::StringBuilder ( const char * str,
Integer len )

Creates a string from str in local encoding.

Definition at line 69 of file StringBuilder.cc.

References m_p.

◆ StringBuilder() [4/9]

Arcane::StringBuilder::StringBuilder ( const std::string & str)

Creates a string from str in local encoding.

Definition at line 28 of file StringBuilder.cc.

References m_p.

◆ StringBuilder() [5/9]

Arcane::StringBuilder::StringBuilder ( const UCharConstArrayView & ustr)

Creates a string from str in Utf16 encoding.

Definition at line 38 of file StringBuilder.cc.

References m_p.

◆ StringBuilder() [6/9]

Arcane::StringBuilder::StringBuilder ( const ByteConstArrayView & ustr)

Creates a string from str in Utf8 encoding.

Definition at line 48 of file StringBuilder.cc.

References m_p.

◆ StringBuilder() [7/9]

Arcane::StringBuilder::StringBuilder ( const StringBuilder & str_builder)

Creates a string from str_builder.

Definition at line 109 of file StringBuilder.cc.

References m_p, and StringBuilder().

Here is the call graph for this function:

◆ StringBuilder() [8/9]

Arcane::StringBuilder::StringBuilder ( StringImpl * impl)
explicit

Creates a string from str in local encoding.

Definition at line 58 of file StringBuilder.cc.

References m_p.

◆ StringBuilder() [9/9]

Arcane::StringBuilder::StringBuilder ( const String & str)

Creates a string from str.

Definition at line 97 of file StringBuilder.cc.

References m_p.

◆ ~StringBuilder()

Arcane::StringBuilder::~StringBuilder ( )

Releases resources.

Definition at line 123 of file StringBuilder.cc.

References m_p.

Member Function Documentation

◆ _checkClone()

void Arcane::StringBuilder::_checkClone ( ) const
private

Definition at line 180 of file StringBuilder.cc.

◆ append()

StringBuilder & Arcane::StringBuilder::append ( const String & str)

Appends str.

Definition at line 234 of file StringBuilder.cc.

References Arcane::String::m_const_ptr_size, Arcane::String::m_p, m_p, Arcane::String::null(), and StringBuilder().

Referenced by Arcane::SimpleTableWriterHelper::_computeName(), Arcane::StringVariableReplace::replaceWithCmdLineArgs(), and Arcane::XmlNode::xpathFullName().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clone()

StringBuilder Arcane::StringBuilder::clone ( ) const

Clones this string.

Definition at line 203 of file StringBuilder.cc.

References m_p, and StringBuilder().

Here is the call graph for this function:

◆ collapseWhiteSpace()

StringBuilder & Arcane::StringBuilder::collapseWhiteSpace ( )

Performs whitespace character normalization. The behavior is identical to replaceWhiteSpace() plus:

  • replacement of all consecutive whitespaces with a single one.
  • removal of whitespaces at the beginning and end of the string. This corresponds to the xs:collapse attribute of XMLSchema 1.0

Definition at line 263 of file StringBuilder.cc.

References m_p, and StringBuilder().

Referenced by Arcane::XmlElementContentChecker::check().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ internalDump()

void Arcane::StringBuilder::internalDump ( std::ostream & ostr) const

Displays internal class information.

This method is only useful for debugging Arccore

Definition at line 374 of file StringBuilder.cc.

References m_p.

◆ operator String()

Arcane::StringBuilder::operator String ( ) const

Returns the constructed character string.

Definition at line 225 of file StringBuilder.cc.

References toString().

Here is the call graph for this function:

◆ operator+=() [1/12]

void Arcane::StringBuilder::operator+= ( char v)

Definition at line 308 of file StringBuilder.cc.

◆ operator+=() [2/12]

void Arcane::StringBuilder::operator+= ( const APReal & v)

Definition at line 365 of file StringBuilder.cc.

◆ operator+=() [3/12]

void Arcane::StringBuilder::operator+= ( const char * str)

Definition at line 296 of file StringBuilder.cc.

◆ operator+=() [4/12]

void Arcane::StringBuilder::operator+= ( const String & str)

Definition at line 302 of file StringBuilder.cc.

◆ operator+=() [5/12]

void Arcane::StringBuilder::operator+= ( double v)

Definition at line 329 of file StringBuilder.cc.

◆ operator+=() [6/12]

void Arcane::StringBuilder::operator+= ( int v)

Definition at line 341 of file StringBuilder.cc.

◆ operator+=() [7/12]

void Arcane::StringBuilder::operator+= ( long double v)

Definition at line 335 of file StringBuilder.cc.

◆ operator+=() [8/12]

void Arcane::StringBuilder::operator+= ( long long v)

Definition at line 359 of file StringBuilder.cc.

◆ operator+=() [9/12]

void Arcane::StringBuilder::operator+= ( long v)

Definition at line 347 of file StringBuilder.cc.

◆ operator+=() [10/12]

void Arcane::StringBuilder::operator+= ( unsigned int v)

Definition at line 323 of file StringBuilder.cc.

◆ operator+=() [11/12]

void Arcane::StringBuilder::operator+= ( unsigned long long v)

Definition at line 353 of file StringBuilder.cc.

◆ operator+=() [12/12]

void Arcane::StringBuilder::operator+= ( unsigned long v)

Definition at line 317 of file StringBuilder.cc.

◆ operator=() [1/3]

const StringBuilder & Arcane::StringBuilder::operator= ( const char * str)

Copies str into this instance.

Definition at line 148 of file StringBuilder.cc.

References m_p, and StringBuilder().

Here is the call graph for this function:

◆ operator=() [2/3]

const StringBuilder & Arcane::StringBuilder::operator= ( const String & str)

Copies str into this instance.

Definition at line 133 of file StringBuilder.cc.

References Arcane::String::m_p, m_p, and StringBuilder().

Here is the call graph for this function:

◆ operator=() [3/3]

const StringBuilder & Arcane::StringBuilder::operator= ( const StringBuilder & str)

Copies str into this instance.

Definition at line 162 of file StringBuilder.cc.

References m_p, and StringBuilder().

Here is the call graph for this function:

◆ replaceWhiteSpace()

StringBuilder & Arcane::StringBuilder::replaceWhiteSpace ( )

Performs whitespace character normalization. All whitespace characters are replaced by space characters #x20, namely #xD (Carriage Return), #xA (Line Feed), and #x9 (Tabulation). This corresponds to the xs:replace attribute of XMLSchema 1.0.

Definition at line 252 of file StringBuilder.cc.

References m_p, and StringBuilder().

Here is the call graph for this function:

◆ toLower()

StringBuilder & Arcane::StringBuilder::toLower ( )

Converts all characters in the string to lowercase.

Definition at line 285 of file StringBuilder.cc.

References m_p, and StringBuilder().

Here is the call graph for this function:

◆ toString()

String Arcane::StringBuilder::toString ( ) const

◆ toUpper()

StringBuilder & Arcane::StringBuilder::toUpper ( )

Converts all characters in the string to uppercase.

Definition at line 274 of file StringBuilder.cc.

References m_p, and StringBuilder().

Here is the call graph for this function:

◆ operator!=

bool operator!= ( const StringBuilder & a,
const StringBuilder & b )
friend

◆ operator==

bool operator== ( const StringBuilder & a,
const StringBuilder & b )
friend

Definition at line 402 of file StringBuilder.cc.

Member Data Documentation

◆ m_const_ptr

const char* Arcane::StringBuilder::m_const_ptr = nullptr
mutableprivate

◆ m_p


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