Description

Functions

   
   
double readNumber(const char * s, std::size_t & cursor, bool checkSign)
   
std::string rTrim(const std::string & s)
   
std::string lTrim(const std::string & s)
   
std::string trim(const std::string & s)
   
std::string replaceAll(const std::string & subject, const std::string & find, const std::string & replace, int count)
   
std::string escape(const std::string & s)
Escape quotes, newlines and backslashes.
   
std::string replaceMultiple(const std::string & subject, const std::vector< std::pair< std::string, std::string > > & rules, int max)
Replace all occurrences of the rules.first with the corresponding rules.second.
   
std::string UCS2LE_to_ANSII(const std::string & str)
   
std::vector< std::string > split(const std::string & subject, const std::string & delimiter, int max)
Split the subject at the occurrence of delimiter into at most max parts.
   
std::string getLine(const std::string & s, const int lineIndex)
   
size_t countCodePoints(const std::string & str_u8)
   
std::string utf32_to_utf8(const uint32_t u32)

Documentation

function
EScript::StringUtils::readNumber

public
     
     
double readNumber( const char * s,
  std::size_t & cursor,
  bool checkSign
)    

Defined in EScript/EScript/Utils/StringUtils.h:20


function
EScript::StringUtils::rTrim

public
     
     
std::string rTrim( const std::string & s )

Defined in EScript/EScript/Utils/StringUtils.h:21


function
EScript::StringUtils::lTrim

public
     
     
std::string lTrim( const std::string & s )

Defined in EScript/EScript/Utils/StringUtils.h:22


function
EScript::StringUtils::trim

public
     
     
std::string trim( const std::string & s )

Defined in EScript/EScript/Utils/StringUtils.h:23


function
EScript::StringUtils::replaceAll

public
     
     
std::string replaceAll( const std::string & subject,
  const std::string & find,
  const std::string & replace,
  int count
)    

Defined in EScript/EScript/Utils/StringUtils.h:24


function
EScript::StringUtils::escape

public
     
     
std::string escape( const std::string & s )

Escape quotes, newlines and backslashes.

Defined in EScript/EScript/Utils/StringUtils.h:27


function
EScript::StringUtils::replaceMultiple

public
     
     
std::string replaceMultiple( const std::string & subject,
  const std::vector< std::pair< std::string, std::string > > & rules,
  int max
)    

Replace all occurrences of the rules.first with the corresponding rules.second.

Defined in EScript/EScript/Utils/StringUtils.h:30


function
EScript::StringUtils::UCS2LE_to_ANSII

public
     
     
std::string UCS2LE_to_ANSII( const std::string & str )

Note: this is only a hack!

Defined in EScript/EScript/Utils/StringUtils.h:33


function
EScript::StringUtils::split

public
     
     
std::vector< std::string > split( const std::string & subject,
  const std::string & delimiter,
  int max
)    

Split the subject at the occurrence of delimiter into at most max parts.

Defined in EScript/EScript/Utils/StringUtils.h:36


function
EScript::StringUtils::getLine

public
     
     
std::string getLine( const std::string & s,
  const int lineIndex
)    

Note: the first line has index 0

Defined in EScript/EScript/Utils/StringUtils.h:39


function
EScript::StringUtils::countCodePoints

public
     
     
size_t countCodePoints( const std::string & str_u8 )

Defined in EScript/EScript/Utils/StringUtils.h:41


function
EScript::StringUtils::utf32_to_utf8

public
     
     
std::string utf32_to_utf8( const uint32_t u32 )

Defined in EScript/EScript/Utils/StringUtils.h:43