Apache Log4cxx  Version 1.8.0
log4cxx::helpers::StringHelper Class Reference

String manipulation routines. More...

#include <stringhelper.h>

Static Public Member Functions

static LogString trim (const LogString &s)
 A copy of s without any leading or trailing space characters. More...
 
static bool startsWith (const LogString &s, const LogString &prefix)
 Does s begin with the characters of prefix? More...
 
static bool endsWith (const LogString &s, const LogString &suffix)
 Does s end with the characters of suffix? More...
 
static bool equalsIgnoreCase (const LogString &s, const logchar *upper, const logchar *lower)
 Is each character in s identical to the character at the corresponding position in either upper or lower? More...
 
static bool equalsIgnoreCase (const LogString &s, const LogString &upper, const LogString &lower)
 Is each character in s identical to the character at the corresponding position in either upper or lower? More...
 
static int toInt (const LogString &s)
 The numeric value at the start of s. More...
 
static int64_t toInt64 (const LogString &s)
 The numeric value at the start of s. More...
 
static void toString (int i, Pool &pool, LogString &dst)
 
static void toString (int64_t i, Pool &pool, LogString &dst)
 
static void toString (size_t i, Pool &pool, LogString &dst)
 
static void toString (int i, LogString &dst)
 Append a textual version of i to dst. More...
 
static void toString (int64_t i, LogString &dst)
 Append a textual version of i to dst. More...
 
static void toString (size_t i, LogString &dst)
 Append a textual version of i to dst. More...
 
static void toString (bool val, LogString &dst)
 Using val, append either "true" or "false" to dst. More...
 
static LogString toLowerCase (const LogString &s)
 A copy of s with any character in [A-Z] replaced by the corresponding character in [a-z]. More...
 
static LogString format (const LogString &pattern, const std::vector< LogString > &params)
 A copy of pattern with any 3-character '{', [0-9], '}', substring replaced by the corresponding value from params. More...
 

Detailed Description

String manipulation routines.

Member Function Documentation

◆ endsWith()

static bool log4cxx::helpers::StringHelper::endsWith ( const LogString s,
const LogString suffix 
)
static

Does s end with the characters of suffix?

◆ equalsIgnoreCase() [1/2]

static bool log4cxx::helpers::StringHelper::equalsIgnoreCase ( const LogString s,
const logchar *  upper,
const logchar *  lower 
)
static

Is each character in s identical to the character at the corresponding position in either upper or lower?

◆ equalsIgnoreCase() [2/2]

static bool log4cxx::helpers::StringHelper::equalsIgnoreCase ( const LogString s,
const LogString upper,
const LogString lower 
)
static

Is each character in s identical to the character at the corresponding position in either upper or lower?

◆ format()

static LogString log4cxx::helpers::StringHelper::format ( const LogString pattern,
const std::vector< LogString > &  params 
)
static

A copy of pattern with any 3-character '{', [0-9], '}', substring replaced by the corresponding value from params.

◆ startsWith()

static bool log4cxx::helpers::StringHelper::startsWith ( const LogString s,
const LogString prefix 
)
static

Does s begin with the characters of prefix?

◆ toInt()

static int log4cxx::helpers::StringHelper::toInt ( const LogString s)
static

The numeric value at the start of s.

See std::stoi for more details.

◆ toInt64()

static int64_t log4cxx::helpers::StringHelper::toInt64 ( const LogString s)
static

The numeric value at the start of s.

See std::stoll for more details.

◆ toLowerCase()

static LogString log4cxx::helpers::StringHelper::toLowerCase ( const LogString s)
static

A copy of s with any character in [A-Z] replaced by the corresponding character in [a-z].

◆ toString() [1/7]

static void log4cxx::helpers::StringHelper::toString ( bool  val,
LogString dst 
)
static

Using val, append either "true" or "false" to dst.

◆ toString() [2/7]

static void log4cxx::helpers::StringHelper::toString ( int  i,
LogString dst 
)
static

Append a textual version of i to dst.

◆ toString() [3/7]

static void log4cxx::helpers::StringHelper::toString ( int  i,
Pool pool,
LogString dst 
)
static
Deprecated:
This function is deprecated and will be removed in a future version.

◆ toString() [4/7]

static void log4cxx::helpers::StringHelper::toString ( int64_t  i,
LogString dst 
)
static

Append a textual version of i to dst.

◆ toString() [5/7]

static void log4cxx::helpers::StringHelper::toString ( int64_t  i,
Pool pool,
LogString dst 
)
static
Deprecated:
This function is deprecated and will be removed in a future version.

◆ toString() [6/7]

static void log4cxx::helpers::StringHelper::toString ( size_t  i,
LogString dst 
)
static

Append a textual version of i to dst.

◆ toString() [7/7]

static void log4cxx::helpers::StringHelper::toString ( size_t  i,
Pool pool,
LogString dst 
)
static
Deprecated:
This function is deprecated and will be removed in a future version.

◆ trim()

static LogString log4cxx::helpers::StringHelper::trim ( const LogString s)
static

A copy of s without any leading or trailing space characters.


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