SAGA API  v9.6
CSG_String Class Reference

#include <api_core.h>

Public Member Functions

 CSG_String (void)
 
 CSG_String (const CSG_String &String)
 
 CSG_String (const char *String)
 
 CSG_String (const wchar_t *String)
 
 CSG_String (char Character, size_t nRepeat=1)
 
 CSG_String (wchar_t Character, size_t nRepeat=1)
 
 CSG_String (const class wxString *pString)
 
bool Create (const class wxString *pString)
 
virtual ~CSG_String (void)
 
CSG_Stringoperator= (const CSG_String &String)
 
CSG_Stringoperator= (const char *String)
 
CSG_Stringoperator= (const wchar_t *String)
 
CSG_Stringoperator= (char Character)
 
CSG_Stringoperator= (wchar_t Character)
 
size_t Length (void) const
 
bool is_Empty (void) const
 
SG_Char operator[] (int i) const
 
SG_Char operator[] (size_t i) const
 
SG_Char Get_Char (size_t i) const
 
void Set_Char (size_t i, char Character)
 
void Set_Char (size_t i, wchar_t Character)
 
const char * b_str (void) const
 
const wchar_t * w_str (void) const
 
const SG_Charc_str (void) const
 
 operator const char * (void) const
 
 operator const wchar_t * (void) const
 
CSG_StringPrepend (const CSG_String &String)
 
CSG_StringAppend (const CSG_String &String)
 
CSG_StringAppend (const char *String)
 
CSG_StringAppend (const wchar_t *String)
 
CSG_StringAppend (char Character, size_t nRepeat=1)
 
CSG_StringAppend (wchar_t Character, size_t nRepeat=1)
 
void operator+= (const CSG_String &String)
 
void operator+= (const char *String)
 
void operator+= (const wchar_t *String)
 
void operator+= (char Character)
 
void operator+= (wchar_t Character)
 
CSG_String operator+ (const CSG_String &String) const
 
CSG_String operator+ (const char *String) const
 
CSG_String operator+ (const wchar_t *String) const
 
CSG_String operator+ (char Character) const
 
CSG_String operator+ (wchar_t Character) const
 
int Cmp (const CSG_String &String) const
 
int CmpNoCase (const CSG_String &String) const
 
bool is_Same_As (const CSG_String &String, bool bCase=true) const
 
bool is_Same_As (const char Character, bool bCase=true) const
 
bool is_Same_As (const wchar_t Character, bool bCase=true) const
 
CSG_StringMake_Lower (void)
 
CSG_StringMake_Upper (void)
 
void Clear (void)
 
int Printf (const char *Format,...)
 
int Printf (const wchar_t *Format,...)
 
size_t Replace (const CSG_String &sOld, const CSG_String &sNew, bool bReplaceAll=true)
 
CSG_StringRemove (size_t pos)
 
CSG_StringRemove (size_t pos, size_t len)
 
int Trim (bool fromRight=false)
 
int Trim_Both (void)
 
int Find (char Character, bool fromEnd=false) const
 
int Find (wchar_t Character, bool fromEnd=false) const
 
int Find (const CSG_String &String) const
 
bool Contains (const CSG_String &String) const
 
CSG_String AfterFirst (char Character) const
 
CSG_String AfterFirst (wchar_t Character) const
 
CSG_String AfterLast (char Character) const
 
CSG_String AfterLast (wchar_t Character) const
 
CSG_String BeforeFirst (char Character) const
 
CSG_String BeforeFirst (wchar_t Character) const
 
CSG_String BeforeLast (char Character) const
 
CSG_String BeforeLast (wchar_t Character) const
 
CSG_String Right (size_t count) const
 
CSG_String Mid (size_t first, size_t count=0) const
 
CSG_String Left (size_t count) const
 
bool is_Number (void) const
 
int asInt (void) const
 
bool asInt (int &Value) const
 
sLong asLongLong (void) const
 
bool asLongLong (sLong &Value) const
 
double asDouble (void) const
 
bool asDouble (double &Value) const
 
size_t to_UTF8 (char **pString) const
 
CSG_Buffer to_UTF8 (void) const
 
size_t to_MBChar (char **pString, int Encoding) const
 
CSG_Buffer to_MBChar (int Encoding) const
 
bool to_ASCII (char **pString, char Replace='_') const
 
CSG_Buffer to_ASCII (char Replace='_') const
 
std::string to_StdString (void) const
 
std::wstring to_StdWstring (void) const
 

Static Public Member Functions

static CSG_String Format (const char *Format,...)
 
static CSG_String Format (const wchar_t *Format,...)
 
static CSG_String from_UTF8 (const char *String, size_t Length=0)
 

Protected Attributes

class wxString * m_pString
 

Detailed Description

Definition at line 562 of file api_core.h.

Constructor & Destructor Documentation

◆ CSG_String() [1/7]

CSG_String::CSG_String ( void  )

Definition at line 73 of file api_string.cpp.

References m_pString.

Referenced by AfterFirst(), AfterLast(), BeforeFirst(), BeforeLast(), Left(), Mid(), and Right().

◆ CSG_String() [2/7]

CSG_String::CSG_String ( const CSG_String String)

Definition at line 78 of file api_string.cpp.

References m_pString.

◆ CSG_String() [3/7]

CSG_String::CSG_String ( const char *  String)

Definition at line 83 of file api_string.cpp.

References m_pString.

◆ CSG_String() [4/7]

CSG_String::CSG_String ( const wchar_t *  String)

Definition at line 88 of file api_string.cpp.

References m_pString.

◆ CSG_String() [5/7]

CSG_String::CSG_String ( char  Character,
size_t  nRepeat = 1 
)

Definition at line 93 of file api_string.cpp.

References m_pString.

◆ CSG_String() [6/7]

CSG_String::CSG_String ( wchar_t  Character,
size_t  nRepeat = 1 
)

Definition at line 98 of file api_string.cpp.

References m_pString.

◆ CSG_String() [7/7]

CSG_String::CSG_String ( const class wxString *  pString)

Definition at line 104 of file api_string.cpp.

References m_pString.

◆ ~CSG_String()

CSG_String::~CSG_String ( void  )
virtual

Definition at line 120 of file api_string.cpp.

References m_pString.

Member Function Documentation

◆ AfterFirst() [1/2]

◆ AfterFirst() [2/2]

CSG_String CSG_String::AfterFirst ( wchar_t  Character) const

Definition at line 649 of file api_string.cpp.

References CSG_String(), and m_pString.

◆ AfterLast() [1/2]

CSG_String CSG_String::AfterLast ( char  Character) const

◆ AfterLast() [2/2]

CSG_String CSG_String::AfterLast ( wchar_t  Character) const

Definition at line 660 of file api_string.cpp.

References CSG_String(), and m_pString.

◆ Append() [1/5]

CSG_String & CSG_String::Append ( char  Character,
size_t  nRepeat = 1 
)

Definition at line 379 of file api_string.cpp.

References m_pString.

◆ Append() [2/5]

CSG_String & CSG_String::Append ( const char *  String)

Definition at line 363 of file api_string.cpp.

References m_pString.

◆ Append() [3/5]

CSG_String & CSG_String::Append ( const CSG_String String)

Definition at line 355 of file api_string.cpp.

References m_pString.

Referenced by CSG_Parameters::DataObjects_Check(), and CSG_Formula::Get_Used_Variables().

◆ Append() [4/5]

CSG_String & CSG_String::Append ( const wchar_t *  String)

Definition at line 371 of file api_string.cpp.

References m_pString.

◆ Append() [5/5]

CSG_String & CSG_String::Append ( wchar_t  Character,
size_t  nRepeat = 1 
)

Definition at line 387 of file api_string.cpp.

References m_pString.

◆ asDouble() [1/2]

bool CSG_String::asDouble ( double &  Value) const

Definition at line 765 of file api_string.cpp.

References m_pString.

◆ asDouble() [2/2]

◆ asInt() [1/2]

bool CSG_String::asInt ( int &  Value) const

Definition at line 727 of file api_string.cpp.

References m_pString.

◆ asInt() [2/2]

◆ asLongLong() [1/2]

bool CSG_String::asLongLong ( sLong Value) const

Definition at line 749 of file api_string.cpp.

References m_pString.

◆ asLongLong() [2/2]

sLong CSG_String::asLongLong ( void  ) const

Definition at line 744 of file api_string.cpp.

Referenced by CSG_MetaData::Get_Content(), and CSG_MetaData::Get_Property().

◆ b_str()

const char * CSG_String::b_str ( void  ) const

◆ BeforeFirst() [1/2]

◆ BeforeFirst() [2/2]

CSG_String CSG_String::BeforeFirst ( wchar_t  Character) const

Definition at line 671 of file api_string.cpp.

References CSG_String(), and m_pString.

◆ BeforeLast() [1/2]

CSG_String CSG_String::BeforeLast ( char  Character) const

◆ BeforeLast() [2/2]

CSG_String CSG_String::BeforeLast ( wchar_t  Character) const

Definition at line 682 of file api_string.cpp.

References CSG_String(), and m_pString.

◆ c_str()

const SG_Char * CSG_String::c_str ( void  ) const

Definition at line 236 of file api_string.cpp.

References m_pString.

Referenced by CSG_Parameter_Font::_asPointer(), CSG_Parameter_File_Name::_Assign(), CSG_Tool_Library_Manager::Add_Directory(), CSG_File_Zip::Add_Directory(), CSG_File_Zip::Add_File(), CSG_Tool_Library_Manager::Add_Library(), CSG_Tool_Library::Add_Reference(), CSG_Parameters::Add_Reference(), CSG_PointCloud::Assign(), CSG_Table_Value_Int::asString(), CSG_Table_Value_Long::asString(), CSG_Table_Value_Double::asString(), Cmp(), CmpNoCase(), CSG_Translator::Create(), CSG_Shapes::Create(), CSG_Tool_Chain::Create(), CSG_Grid::Create(), CSG_Table::Create(), CSG_HTTP::Create(), CSG_Tool_Library_Interface::Create(), CSG_Tool_Library_Manager::Create_Python_ToolBox(), CSG_Parameters::DataObjects_Check(), CSG_Tool::Execute(), CSG_Tool_Interactive_Base::Execute_Finish(), CSG_TimeSpan::Format(), CSG_DateTime::Format(), CSG_MetaData::from_JSON(), CSG_Bytes::fromHexString(), CSG_MetaData::Get_Content(), CSG_Parameters_CRSPicker::Get_CRS(), CSG_Projection::Get_Description(), CSG_Parameter::Get_Description(), CSG_File_Zip::Get_File(), CSG_Data_Object::Get_File_Name(), CSG_Parameter_File_Name::Get_Filter(), CSG_Parameters::Get_Parameter(), CSG_Parameters::Get_String(), CSG_Tool::Get_Summary(), CSG_Tool_Library::Get_Summary(), CSG_Grids::Load(), CSG_MetaData::Load(), CSG_MetaData::Load_HTTP(), Mid(), CSG_Parameters::Msg_String(), CSG_File::Open(), CSG_File_Zip::Open(), CSG_DateTime::Parse_Date(), CSG_DateTime::Parse_DateTime(), CSG_DateTime::Parse_Format(), CSG_DateTime::Parse_ISOCombined(), CSG_DateTime::Parse_ISODate(), CSG_DateTime::Parse_ISOTime(), CSG_Grid_File_Info::Save(), CSG_Table::Save(), CSG_Grid::Save(), CSG_Grids::Save(), CSG_PointCloud::Save(), CSG_Shapes::Save(), CSG_Projection::Save(), CSG_String_Tokenizer::Set_String(), SG_Dir_Create(), SG_Dir_Delete(), SG_Dir_Exists(), SG_Dir_List_Files(), SG_Dir_List_Subdirectories(), SG_File_Cmp_Path(), SG_File_Delete(), SG_File_Exists(), SG_File_Get_Extension(), SG_File_Get_Name(), SG_File_Get_Name_Temp(), SG_File_Get_Path(), SG_File_Get_Path_Absolute(), SG_File_Get_Path_Relative(), SG_File_Make_Path(), SG_File_Set_Extension(), SG_FTP_Download(), SG_Initialize_Environment(), SG_UI_Dlg_Info(), SG_UI_Dlg_Message(), SG_UI_Msg_Add_Error(), and SG_XML_Add_Parameter().

◆ Clear()

◆ Cmp()

int CSG_String::Cmp ( const CSG_String String) const

◆ CmpNoCase()

◆ Contains()

bool CSG_String::Contains ( const CSG_String String) const

Definition at line 633 of file api_string.cpp.

References m_pString.

◆ Create()

bool CSG_String::Create ( const class wxString *  pString)

Definition at line 109 of file api_string.cpp.

References m_pString.

◆ Find() [1/3]

◆ Find() [2/3]

int CSG_String::Find ( const CSG_String String) const

Definition at line 627 of file api_string.cpp.

References m_pString.

◆ Find() [3/3]

int CSG_String::Find ( wchar_t  Character,
bool  fromEnd = false 
) const

Definition at line 621 of file api_string.cpp.

References m_pString.

◆ Format() [1/2]

CSG_String CSG_String::Format ( const char *  Format,
  ... 
)
static

Definition at line 270 of file api_string.cpp.

References m_pString.

Referenced by CSG_Parameter_Font::_Serialize(), CSG_Parameter_Colors::_Serialize(), CSG_Parameter_Choices::_Set_String(), CSG_Parameter_Table_Fields::_Set_Value(), CSG_MetaData::Add_Child(), CSG_Parameter_Table_Field::Add_Default(), CSG_Parameter_Grid::Add_Default(), CSG_Table::Add_Field(), CSG_Tool_Library_Manager::Add_Library(), CSG_Distance_Weighting::Add_Parameters(), CSG_Grid_Cell_Addressor::Add_Parameters(), CSG_MetaData::Add_Property(), CSG_Parameters::Add_Reference(), CSG_Tool_Library::Add_Reference(), CSG_Regression::asString(), CSG_Parameters_Point_Search::Create(), CSG_Shapes::Create(), CSG_Tool_Chain::Create(), CSG_Grid::Create(), CSG_Table::Create(), CSG_Tool_Library_Interface::Create(), CSG_Parameters_Grid_Target::Create(), CSG_TIN::Create(), CSG_Projection::Create(), CSG_Tool_Library_Manager::Create_Python_ToolBox(), CSG_Tool_Library_Manager::Create_Tool(), CSG_Data_Object::CSG_Data_Object(), CSG_Parameters::DataObjects_Check(), CSG_Tool::Error_Set(), CSG_Tool::Execute(), CSG_Tool_Interactive_Base::Execute_Finish(), Format(), CSG_MetaData::from_JSON(), CSG_Parameters_CRSPicker::Get_CRS(), CSG_Projection::Get_Description(), CSG_Parameter::Get_Description(), CSG_Formula::Get_Error(), CSG_Trend::Get_Formula(), CSG_Regression_Multiple::Get_Info(), CSG_Projections::Get_Names_List(), CSG_Parameters::Get_Parameter(), CSG_Parameters::Get_String(), CSG_Tool::Get_Summary(), CSG_Tool_Library_Manager::Get_Summary(), CSG_Tool_Library::Get_Summary(), CSG_Data_Manager::Get_Summary(), CSG_Tool_Library_Manager::Get_Tool(), CSG_KDTree::Get_Version(), CSG_MetaData::Ins_Child(), CSG_Grids::Load(), CSG_Parameters::Msg_String(), CSG_Grids::On_Delete(), CSG_Classifier_Supervised::Print(), Printf(), CSG_Grid_File_Info::Save(), CSG_Table::Save(), CSG_Grid::Save(), CSG_Grids::Save(), CSG_PointCloud::Save(), CSG_Shapes::Save(), CSG_Regression_Multiple::Set_Data(), CSG_MetaData::Set_Property(), CSG_Table_DBase::Set_Value(), CSG_Table_Value_String::Set_Value(), SG_Double_To_Degree(), SG_FTP_Download(), SG_Get_Double_asString(), SG_Get_String(), SG_UI_Dlg_Info(), SG_UI_Dlg_Message(), SG_UI_Msg_Add_Error(), SG_UI_Process_Get_Okay(), SG_UI_Process_Set_Progress(), SG_XML_Add_Parameter(), CSG_Matrix::to_String(), CSG_Colors::to_Text(), CSG_Bytes::toHexString(), CSG_Data_Object::Track(), and CSG_Data_Object::~CSG_Data_Object().

◆ Format() [2/2]

CSG_String CSG_String::Format ( const wchar_t *  Format,
  ... 
)
static

Definition at line 289 of file api_string.cpp.

References Format(), and m_pString.

◆ from_UTF8()

CSG_String CSG_String::from_UTF8 ( const char *  String,
size_t  Length = 0 
)
static

Definition at line 787 of file api_string.cpp.

References Length(), and m_pString.

Referenced by CSG_Table_DBase::asString().

◆ Get_Char()

SG_Char CSG_String::Get_Char ( size_t  i) const

Definition at line 209 of file api_string.cpp.

References Length(), m_pString, and SG_T.

Referenced by SG_Color_From_Text().

◆ is_Empty()

bool CSG_String::is_Empty ( void  ) const

Definition at line 178 of file api_string.cpp.

References m_pString.

Referenced by CSG_Parameter_Choice::_Set_Value(), CSG_Parameter_Font::_Set_Value(), CSG_Parameter_Table_Fields::_Set_Value(), CSG_Table::Add_Field(), CSG_Parameter_Choice::Add_Item(), CSG_MetaData::Add_Property(), CSG_Parameters::Add_Reference(), CSG_Tool_Library::Add_Reference(), CSG_Parameters_Point_Search::Create(), CSG_Tool_Chain::Create(), CSG_Projection::Create(), CSG_Grid_File_Info::Create(), CSG_Tool::Dlg_Parameters(), CSG_TimeSpan::Format(), CSG_MetaData::from_JSON(), CSG_MetaData::Get_Content(), CSG_Parameter_Choice::Get_Data(), CSG_Projection::Get_Description(), CSG_Parameter::Get_Description(), CSG_Data_Object::Get_Description(), CSG_Tool::Get_Description(), CSG_Grids::Get_Grid_Name(), CSG_Formula::Get_Help_Operators(), CSG_Tool::Get_MenuPath(), CSG_Parameters::Get_Parameter(), CSG_Projections::Get_Preference(), CSG_Tool::Get_Summary(), CSG_Tool_Library::Get_Summary(), CSG_Data_Manager::Get_Summary(), CSG_Trend::Get_Trend(), CSG_Projection::is_Equal(), CSG_Parameter_String::is_Valid(), CSG_File::Open(), CSG_File_Zip::Open(), CSG_Projections::Parse(), CSG_File::Read_Line(), CSG_Classifier_Supervised::Save(), CSG_Projection::Save(), CSG_Colors::Serialize(), CSG_Parameter_Data_Type::Set_Data_Types(), CSG_Data_Object::Set_File_Name(), CSG_Data_Object::Set_Name(), SG_Color_From_Text(), SG_Dir_List_Files(), SG_File_Make_Path(), SG_FTP_Download(), SG_HTML_Tag_Replacer(), SG_UI_Dlg_Parameters(), SG_UI_Get_API_Path(), SG_UI_Get_Application_Name(), SG_UI_Get_Application_Path(), and SG_XML_Add_Parameter().

◆ is_Number()

bool CSG_String::is_Number ( void  ) const

Definition at line 716 of file api_string.cpp.

References m_pString.

◆ is_Same_As() [1/3]

bool CSG_String::is_Same_As ( const char  Character,
bool  bCase = true 
) const

Definition at line 532 of file api_string.cpp.

References m_pString.

◆ is_Same_As() [2/3]

bool CSG_String::is_Same_As ( const CSG_String String,
bool  bCase = true 
) const

Definition at line 527 of file api_string.cpp.

References m_pString.

◆ is_Same_As() [3/3]

bool CSG_String::is_Same_As ( const wchar_t  Character,
bool  bCase = true 
) const

Definition at line 537 of file api_string.cpp.

References m_pString.

◆ Left()

CSG_String CSG_String::Left ( size_t  count) const

◆ Length()

◆ Make_Lower()

CSG_String & CSG_String::Make_Lower ( void  )

Definition at line 543 of file api_string.cpp.

References m_pString.

Referenced by CSG_Translator::Create(), CSG_Tool_Chain::Create(), and SG_XML_Add_Parameter().

◆ Make_Upper()

CSG_String & CSG_String::Make_Upper ( void  )

Definition at line 551 of file api_string.cpp.

References m_pString.

Referenced by CSG_Projection::Create().

◆ Mid()

CSG_String CSG_String::Mid ( size_t  first,
size_t  count = 0 
) const

◆ operator const char *()

CSG_String::operator const char * ( void  ) const
inline

Definition at line 598 of file api_core.h.

◆ operator const wchar_t *()

CSG_String::operator const wchar_t * ( void  ) const
inline

Definition at line 599 of file api_core.h.

◆ operator+() [1/5]

CSG_String CSG_String::operator+ ( char  Character) const

Definition at line 454 of file api_string.cpp.

◆ operator+() [2/5]

CSG_String CSG_String::operator+ ( const char *  String) const

Definition at line 435 of file api_string.cpp.

◆ operator+() [3/5]

CSG_String CSG_String::operator+ ( const CSG_String String) const

Definition at line 426 of file api_string.cpp.

◆ operator+() [4/5]

CSG_String CSG_String::operator+ ( const wchar_t *  String) const

Definition at line 444 of file api_string.cpp.

◆ operator+() [5/5]

CSG_String CSG_String::operator+ ( wchar_t  Character) const

Definition at line 463 of file api_string.cpp.

◆ operator+=() [1/5]

void CSG_String::operator+= ( char  Character)

Definition at line 410 of file api_string.cpp.

References m_pString.

◆ operator+=() [2/5]

void CSG_String::operator+= ( const char *  String)

Definition at line 400 of file api_string.cpp.

References m_pString.

◆ operator+=() [3/5]

void CSG_String::operator+= ( const CSG_String String)

Definition at line 395 of file api_string.cpp.

References m_pString.

◆ operator+=() [4/5]

void CSG_String::operator+= ( const wchar_t *  String)

Definition at line 405 of file api_string.cpp.

References m_pString.

◆ operator+=() [5/5]

void CSG_String::operator+= ( wchar_t  Character)

Definition at line 415 of file api_string.cpp.

References m_pString.

◆ operator=() [1/5]

CSG_String & CSG_String::operator= ( char  Character)

Definition at line 152 of file api_string.cpp.

References m_pString.

◆ operator=() [2/5]

CSG_String & CSG_String::operator= ( const char *  String)

Definition at line 138 of file api_string.cpp.

References m_pString.

◆ operator=() [3/5]

CSG_String & CSG_String::operator= ( const CSG_String String)

Definition at line 131 of file api_string.cpp.

References m_pString.

◆ operator=() [4/5]

CSG_String & CSG_String::operator= ( const wchar_t *  String)

Definition at line 145 of file api_string.cpp.

References m_pString.

◆ operator=() [5/5]

CSG_String & CSG_String::operator= ( wchar_t  Character)

Definition at line 159 of file api_string.cpp.

References m_pString.

◆ operator[]() [1/2]

SG_Char CSG_String::operator[] ( int  i) const

Definition at line 189 of file api_string.cpp.

References Length(), m_pString, and SG_T.

◆ operator[]() [2/2]

SG_Char CSG_String::operator[] ( size_t  i) const

Definition at line 199 of file api_string.cpp.

References Length(), m_pString, and SG_T.

◆ Prepend()

CSG_String & CSG_String::Prepend ( const CSG_String String)

Definition at line 347 of file api_string.cpp.

References m_pString.

Referenced by CSG_Tool_Chain::Create(), and CSG_Data_Manager::Get_Summary().

◆ Printf() [1/2]

◆ Printf() [2/2]

int CSG_String::Printf ( const wchar_t *  Format,
  ... 
)

Definition at line 325 of file api_string.cpp.

References Format(), and m_pString.

◆ Remove() [1/2]

CSG_String & CSG_String::Remove ( size_t  pos)

Definition at line 569 of file api_string.cpp.

References m_pString.

◆ Remove() [2/2]

CSG_String & CSG_String::Remove ( size_t  pos,
size_t  len 
)

Definition at line 577 of file api_string.cpp.

References m_pString.

◆ Replace()

◆ Right()

◆ Set_Char() [1/2]

void CSG_String::Set_Char ( size_t  i,
char  Character 
)

Definition at line 220 of file api_string.cpp.

References m_pString.

Referenced by SG_Flip_Decimal_Separators().

◆ Set_Char() [2/2]

void CSG_String::Set_Char ( size_t  i,
wchar_t  Character 
)

Definition at line 225 of file api_string.cpp.

References m_pString.

◆ to_ASCII() [1/2]

bool CSG_String::to_ASCII ( char **  pString,
char  Replace = '_' 
) const

This function creates a single char array and fills it with the ASCII representation of this string object. If successful pString will point to the address of the allocated memory. Freeing memory is in response of the calling function.

Definition at line 909 of file api_string.cpp.

References CSG_Buffer::Get_Data(), CSG_Buffer::Get_Size(), and SG_Malloc().

Referenced by CSG_Table_DBase::Set_Value(), SG_UI_Console_Print_StdErr(), SG_UI_Console_Print_StdOut(), and CSG_File::Write().

◆ to_ASCII() [2/2]

CSG_Buffer CSG_String::to_ASCII ( char  Replace = '_') const

Definition at line 926 of file api_string.cpp.

References m_pString, Replace(), and CSG_Buffer::Set_Data().

◆ to_MBChar() [1/2]

size_t CSG_String::to_MBChar ( char **  pString,
int  Encoding 
) const

This function creates a single char array and fills it with the multibyte representation of this string object. If successful pString will point to the address of the allocated memory. Freeing memory is in response of the calling function.

Definition at line 855 of file api_string.cpp.

References CSG_Buffer::Get_Data(), CSG_Buffer::Get_Size(), and SG_Malloc().

◆ to_MBChar() [2/2]

◆ to_StdString()

std::string CSG_String::to_StdString ( void  ) const

This function returns the string as an std::string in the current locale encoding. Note that if the conversion of the string contents to the current locale fails, the return string will be empty.

Definition at line 954 of file api_string.cpp.

References m_pString.

◆ to_StdWstring()

std::wstring CSG_String::to_StdWstring ( void  ) const

This function returns the string as an std::wstring.

Definition at line 964 of file api_string.cpp.

References m_pString.

◆ to_UTF8() [1/2]

size_t CSG_String::to_UTF8 ( char **  pString) const

This function creates a single char array and fills it with the UTF-8 representation of this string object. If successful pString will point to the address of the allocated memory. Freeing memory is in response of the calling function.

Definition at line 813 of file api_string.cpp.

References CSG_Buffer::Get_Data(), CSG_Buffer::Get_Size(), SG_Malloc(), and to_UTF8().

Referenced by CSG_Table::Get_Field_Length(), CSG_Table_DBase::Set_Value(), SG_UI_Console_Print_StdErr(), and SG_UI_Console_Print_StdOut().

◆ to_UTF8() [2/2]

CSG_Buffer CSG_String::to_UTF8 ( void  ) const

Definition at line 830 of file api_string.cpp.

References m_pString, and CSG_Buffer::Set_Data().

Referenced by to_UTF8().

◆ Trim()

int CSG_String::Trim ( bool  fromRight = false)

◆ Trim_Both()

int CSG_String::Trim_Both ( void  )

Definition at line 600 of file api_string.cpp.

References m_pString.

Referenced by CSG_Shapes_OGIS_Converter::from_WKText().

◆ w_str()

const wchar_t * CSG_String::w_str ( void  ) const

Definition at line 248 of file api_string.cpp.

References m_pString.

Referenced by SG_Get_Environment(), SG_Set_Environment(), and CSG_File::Write().

Member Data Documentation

◆ m_pString


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