Lucene++ - a full-featured, c++ search engine
API Documentation


Loading...
Searching...
No Matches
Lucene::StringUtils Class Reference

#include <StringUtils.h>

Static Public Member Functions

static int32_t toUnicode (const uint8_t *utf8, int32_t length, CharArray unicode)
 Convert uft8 buffer into unicode.
static int32_t toUnicode (const uint8_t *utf8, int32_t length, const UnicodeResultPtr &unicodeResult)
 Convert uft8 buffer into unicode.
static String toUnicode (const uint8_t *utf8, int32_t length)
 Convert uft8 buffer into unicode.
static String toUnicode (const SingleString &s)
 Convert uft8 string into unicode.
static int32_t toUTF8 (const wchar_t *unicode, int32_t length, ByteArray utf8)
 Convert unicode buffer into uft8.
static int32_t toUTF8 (const wchar_t *unicode, int32_t length, const UTF8ResultPtr &utf8Result)
 Convert unicode buffer into uft8.
static SingleString toUTF8 (const wchar_t *unicode, int32_t length)
 Convert unicode buffer into uft8.
static SingleString toUTF8 (const String &s)
 Convert unicode string into uft8.
static void toLower (String &str)
 Convert given string to lower case using current locale.
static String toLower (const String &str)
 Convert given string to lower case using current locale.
static void toUpper (String &str)
 Convert given string to upper case using current locale.
static String toUpper (const String &str)
 Convert given string to upper case using current locale.
static int32_t compareCase (const String &first, const String &second)
 Compare two strings ignoring case differences.
static Collection< String > split (const String &str, const String &delim)
 Splits string using given delimiters.
static int32_t toInt (const String &value)
 Convert the given string to int32_t.
static int64_t toLong (const String &value)
 Convert the given string to int64_t.
static int64_t toLong (const String &value, int32_t base)
 Return given value as a long integer using base unit.
static double toDouble (const String &value)
 Convert the given string to double.
static int32_t hashCode (const String &value)
 Compute the hash code from string.
static String toString (int64_t value, int32_t base)
 Return given value as a string using base unit.
template<class TYPE>
static String toString (const TYPE &value)
 Convert any given type to a String.

Static Public Attributes

static const int32_t MAX_ENCODING_UTF8_SIZE
 Maximum length of UTF encoding.
static const int32_t CHARACTER_MAX_RADIX
 Default character radix.

Member Function Documentation

◆ compareCase()

int32_t Lucene::StringUtils::compareCase ( const String & first,
const String & second )
static

Compare two strings ignoring case differences.

◆ hashCode()

int32_t Lucene::StringUtils::hashCode ( const String & value)
static

Compute the hash code from string.

Referenced by Lucene::VariantUtils::hashCode().

◆ split()

Collection< String > Lucene::StringUtils::split ( const String & str,
const String & delim )
static

Splits string using given delimiters.

◆ toDouble()

double Lucene::StringUtils::toDouble ( const String & value)
static

Convert the given string to double.

◆ toInt()

int32_t Lucene::StringUtils::toInt ( const String & value)
static

Convert the given string to int32_t.

◆ toLong() [1/2]

int64_t Lucene::StringUtils::toLong ( const String & value)
static

Convert the given string to int64_t.

◆ toLong() [2/2]

int64_t Lucene::StringUtils::toLong ( const String & value,
int32_t base )
static

Return given value as a long integer using base unit.

◆ toLower() [1/2]

String Lucene::StringUtils::toLower ( const String & str)
static

Convert given string to lower case using current locale.

◆ toLower() [2/2]

void Lucene::StringUtils::toLower ( String & str)
static

Convert given string to lower case using current locale.

◆ toString() [1/2]

template<class TYPE>
String Lucene::StringUtils::toString ( const TYPE & value)
inlinestatic

Convert any given type to a String.

◆ toString() [2/2]

String Lucene::StringUtils::toString ( int64_t value,
int32_t base )
static

Return given value as a string using base unit.

◆ toUnicode() [1/4]

String Lucene::StringUtils::toUnicode ( const SingleString & s)
static

Convert uft8 string into unicode.

◆ toUnicode() [2/4]

String Lucene::StringUtils::toUnicode ( const uint8_t * utf8,
int32_t length )
static

Convert uft8 buffer into unicode.

◆ toUnicode() [3/4]

int32_t Lucene::StringUtils::toUnicode ( const uint8_t * utf8,
int32_t length,
CharArray unicode )
static

Convert uft8 buffer into unicode.

◆ toUnicode() [4/4]

int32_t Lucene::StringUtils::toUnicode ( const uint8_t * utf8,
int32_t length,
const UnicodeResultPtr & unicodeResult )
static

Convert uft8 buffer into unicode.

◆ toUpper() [1/2]

String Lucene::StringUtils::toUpper ( const String & str)
static

Convert given string to upper case using current locale.

◆ toUpper() [2/2]

void Lucene::StringUtils::toUpper ( String & str)
static

Convert given string to upper case using current locale.

◆ toUTF8() [1/4]

SingleString Lucene::StringUtils::toUTF8 ( const String & s)
static

Convert unicode string into uft8.

◆ toUTF8() [2/4]

SingleString Lucene::StringUtils::toUTF8 ( const wchar_t * unicode,
int32_t length )
static

Convert unicode buffer into uft8.

◆ toUTF8() [3/4]

int32_t Lucene::StringUtils::toUTF8 ( const wchar_t * unicode,
int32_t length,
ByteArray utf8 )
static

Convert unicode buffer into uft8.

◆ toUTF8() [4/4]

int32_t Lucene::StringUtils::toUTF8 ( const wchar_t * unicode,
int32_t length,
const UTF8ResultPtr & utf8Result )
static

Convert unicode buffer into uft8.

Field Documentation

◆ CHARACTER_MAX_RADIX

const int32_t Lucene::StringUtils::CHARACTER_MAX_RADIX
static

Default character radix.

◆ MAX_ENCODING_UTF8_SIZE

const int32_t Lucene::StringUtils::MAX_ENCODING_UTF8_SIZE
static

Maximum length of UTF encoding.


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

clucene.sourceforge.net