LibreOffice: rtl Namespace Reference

LibreOffice LibreOffice 26.8 SDK C/C++ API Reference

Loading...
Searching...
No Matches
rtl Namespace Reference

## Namespaces
namespace | libreoffice_internal
namespace | math

## Classes
class | Bootstrap
class | ByteSequence
| C++ class representing a SAL byte sequence. More...
struct | CStringEqual
| Equality functor for classic c-strings (i.e., null-terminated char* strings). More...
struct | CStringHash
| Hashing functor for classic c-strings (i.e., null-terminated char* strings). More...
class | MalformedUriException
| An exception indicating a malformed URI. More...
class | OString
| This String class provide base functionality for C++ like 8-Bit character array handling. More...
class | OStringBuffer
| A string buffer implements a mutable sequence of characters. More...
struct | OStringHash
| A helper to use OStrings with hash maps. More...
class | OUString
| This String class provides base functionality for C++ like Unicode character array handling. More...
class | OUStringBuffer
| A string buffer implements a mutable sequence of characters. More...
struct | OUStringHash
| A helper to use OUStrings with hash maps. More...
class | Reference
| Template reference class for reference type. More...
class | Static
| Helper base class for a late-initialized (default-constructed) static variable, implementing the double-checked locking pattern correctly. More...
class | StaticAggregate
| Helper class for a late-initialized static aggregate, e.g. More...
class | StaticWithArg
| Helper base class for a late-initialized (default-constructed) static variable, implementing the double-checked locking pattern correctly. More...
class | StaticWithInit
| Helper base class for a late-initialized static variable, implementing the double-checked locking pattern correctly. More...
class | Uri
| A wrapper around the C functions from <rtl/uri.h>. More...

## Enumerations
enum | __ByteSequence_NoDefault { BYTESEQ_NODEFAULT = 0xcafe }
enum | __ByteSequence_NoAcquire { BYTESEQ_NOACQUIRE }

## Functions
SAL_CONSTEXPR bool | isUnicodeCodePoint (sal_uInt32 code)
| Check for Unicode code point.
SAL_CONSTEXPR bool | isAscii (sal_uInt32 code)
| Check for ASCII character.
SAL_CONSTEXPR bool | isAsciiLowerCase (sal_uInt32 code)
| Check for ASCII lower case character.
SAL_CONSTEXPR bool | isAsciiUpperCase (sal_uInt32 code)
| Check for ASCII upper case character.
SAL_CONSTEXPR bool | isAsciiAlpha (sal_uInt32 code)
| Check for ASCII alphabetic character.
SAL_CONSTEXPR bool | isAsciiDigit (sal_uInt32 code)
| Check for ASCII digit character.
SAL_CONSTEXPR bool | isAsciiAlphanumeric (sal_uInt32 code)
| Check for ASCII alphanumeric character.
SAL_CONSTEXPR bool | isAsciiCanonicHexDigit (sal_uInt32 code)
| Check for ASCII canonic hexadecimal digit character.
SAL_CONSTEXPR bool | isAsciiHexDigit (sal_uInt32 code)
| Check for ASCII hexadecimal digit character.
SAL_CONSTEXPR bool | isAsciiOctalDigit (sal_uInt32 code)
| Check for ASCII octal digit character.
SAL_CONSTEXPR bool | isAsciiWhiteSpace (sal_uInt32 code)
| Check for ASCII white space character.
SAL_CONSTEXPR sal_uInt32 | toAsciiUpperCase (sal_uInt32 code)
| Convert a character, if ASCII, to upper case.
SAL_CONSTEXPR sal_uInt32 | toAsciiLowerCase (sal_uInt32 code)
| Convert a character, if ASCII, to lower case.
SAL_CONSTEXPR sal_Int32 | compareIgnoreAsciiCase (sal_uInt32 code1, sal_uInt32 code2)
| Compare two characters ignoring ASCII case.
SAL_CONSTEXPR bool | isSurrogate (sal_uInt32 code)
| Check for surrogate.
SAL_CONSTEXPR bool | isHighSurrogate (sal_uInt32 code)
| Check for high surrogate.
SAL_CONSTEXPR bool | isLowSurrogate (sal_uInt32 code)
| Check for low surrogate.
SAL_CONSTEXPR sal_Unicode | getHighSurrogate (sal_uInt32 code)
| Get high surrogate half of a non-BMP Unicode code point.
SAL_CONSTEXPR sal_Unicode | getLowSurrogate (sal_uInt32 code)
| Get low surrogate half of a non-BMP Unicode code point.
SAL_CONSTEXPR sal_uInt32 | combineSurrogates (sal_uInt32 high, sal_uInt32 low)
| Combine surrogates to form a code point.
SAL_CONSTEXPR std::size_t | splitSurrogates (sal_uInt32 code, sal_Unicode *output)
| Split a Unicode code point into UTF-16 code units.
SAL_CONSTEXPR bool | isUnicodeScalarValue (sal_uInt32 code)
| Check for Unicode scalar value.
template<typename charT, typename traits>
std::basic_ostream< charT, traits > & | operator<< (std::basic_ostream< charT, traits > &stream, OString const &rString)
| Support for rtl::OString in std::ostream (and thus in CPPUNIT_ASSERT or SAL_INFO macros, for example).
OUString | OStringToOUString (const OString &rStr, rtl_TextEncoding encoding, sal_uInt32 convertFlags=OSTRING_TO_OUSTRING_CVTFLAGS)
| Convert an OString to an OUString, using a specific text encoding.
OString | OUStringToOString (const OUString &rUnicode, rtl_TextEncoding encoding, sal_uInt32 convertFlags=OUSTRING_TO_OSTRING_CVTFLAGS)
| Convert an OUString to an OString, using a specific text encoding.
template<typename charT, typename traits>
std::basic_ostream< charT, traits > & | operator<< (std::basic_ostream< charT, traits > &stream, OUString const &rString)
| Support for rtl::OUString in std::ostream (and thus in CPPUNIT_ASSERT or SAL_INFO macros, for example).

## Enumeration Type Documentation

## ◆ __ByteSequence_NoAcquire

enum rtl::__ByteSequence_NoAcquire

Enumerator
BYTESEQ_NOACQUIRE | This enum value can be used to create a bytesequence from a C-Handle without acquiring the handle.

## ◆ __ByteSequence_NoDefault

enum rtl::__ByteSequence_NoDefault

Enumerator
BYTESEQ_NODEFAULT | This enum value can be used to create a bytesequence with uninitialized data.

## Function Documentation

## ◆ combineSurrogates()

SAL_CONSTEXPR sal_uInt32 rtl::combineSurrogates | ( | sal_uInt32 | high,
|  | sal_uInt32 | low )
| inline

Combine surrogates to form a code point.

Parameters

  high | A high surrogate code point.
  low | A low surrogate code point.

Returns
  The code point represented by the surrogate pair.

Since
  LibreOffice 5.0

## ◆ compareIgnoreAsciiCase()

SAL_CONSTEXPR sal_Int32 rtl::compareIgnoreAsciiCase | ( | sal_uInt32 | code1,
|  | sal_uInt32 | code2 )
| inline

Compare two characters ignoring ASCII case.

Parameters

  code1 | A Unicode code point.
  code2 | A unicode code point.

Returns
  0 if both code points are equal, < 0 if code1 is less than code2, > 0 if code1 is greater than code2.

Since
  LibreOffice 4.2

## ◆ getHighSurrogate()

SAL_CONSTEXPR sal_Unicode rtl::getHighSurrogate | ( | sal_uInt32 | code | ) |
| inline

Get high surrogate half of a non-BMP Unicode code point.

Parameters

  code | A non-BMP Unicode code point.

Returns
  The UTF-16 high surrogate half for the give code point.

Since
  LibreOffice 5.0

## ◆ getLowSurrogate()

SAL_CONSTEXPR sal_Unicode rtl::getLowSurrogate | ( | sal_uInt32 | code | ) |
| inline

Get low surrogate half of a non-BMP Unicode code point.

Parameters

  code | A non-BMP Unicode code point.

Returns
  The UTF-16 low surrogate half for the give code point.

Since
  LibreOffice 5.0

## ◆ isAscii()

SAL_CONSTEXPR bool rtl::isAscii | ( | sal_uInt32 | code | ) |
| inline

Check for ASCII character.

Parameters

  code | A Unicode code point.

Returns
  True if code is an ASCII character (0x00–0x7F).

Since
  LibreOffice 4.1

## ◆ isAsciiAlpha()

SAL_CONSTEXPR bool rtl::isAsciiAlpha | ( | sal_uInt32 | code | ) |
| inline

Check for ASCII alphabetic character.

Parameters

  code | A Unicode code point.

Returns
  True if code is an ASCII alphabetic character (ASCII 'A'–'Z' or 'a'–'z').

Since
  LibreOffice 4.1

## ◆ isAsciiAlphanumeric()

SAL_CONSTEXPR bool rtl::isAsciiAlphanumeric | ( | sal_uInt32 | code | ) |
| inline

Check for ASCII alphanumeric character.

Parameters

  code | A Unicode code point.

Returns
  True if code is an ASCII alphanumeric character (ASCII '0'–'9', 'A'–'Z', or 'a'–'z').

Since
  LibreOffice 4.1

## ◆ isAsciiCanonicHexDigit()

SAL_CONSTEXPR bool rtl::isAsciiCanonicHexDigit | ( | sal_uInt32 | code | ) |
| inline

Check for ASCII canonic hexadecimal digit character.

Parameters

  code | A Unicode code point.

Returns
  True if code is an ASCII canonic (i.e., upper case) hexadecimal digit character (ASCII '0'–'9' or 'A'–'F').

Since
  LibreOffice 4.1

## ◆ isAsciiDigit()

SAL_CONSTEXPR bool rtl::isAsciiDigit | ( | sal_uInt32 | code | ) |
| inline

Check for ASCII digit character.

Parameters

  code | A Unicode code point.

Returns
  True if code is an ASCII (decimal) digit character (ASCII '0'–'9').

Since
  LibreOffice 4.1

## ◆ isAsciiHexDigit()

SAL_CONSTEXPR bool rtl::isAsciiHexDigit | ( | sal_uInt32 | code | ) |
| inline

Check for ASCII hexadecimal digit character.

Parameters

  code | A Unicode code point.

Returns
  True if code is an ASCII hexadecimal digit character (ASCII '0'–'9', 'A'–'F', or 'a'–'f').

Since
  LibreOffice 4.1

## ◆ isAsciiLowerCase()

SAL_CONSTEXPR bool rtl::isAsciiLowerCase | ( | sal_uInt32 | code | ) |
| inline

Check for ASCII lower case character.

Parameters

  code | A Unicode code point.

Returns
  True if code is an ASCII lower case alphabetic character (ASCII 'a'–'z').

Since
  LibreOffice 4.1

## ◆ isAsciiOctalDigit()

SAL_CONSTEXPR bool rtl::isAsciiOctalDigit | ( | sal_uInt32 | code | ) |
| inline

Check for ASCII octal digit character.

Parameters

  code | A Unicode code point.

Returns
  True if code is an ASCII octal digit character (ASCII '0'–'7').

Since
  LibreOffice 5.0

## ◆ isAsciiUpperCase()

SAL_CONSTEXPR bool rtl::isAsciiUpperCase | ( | sal_uInt32 | code | ) |
| inline

Check for ASCII upper case character.

Parameters

  code | A Unicode code point.

Returns
  True if code is an ASCII upper case alphabetic character (ASCII 'A'–'Z').

Since
  LibreOffice 4.1

## ◆ isAsciiWhiteSpace()

SAL_CONSTEXPR bool rtl::isAsciiWhiteSpace | ( | sal_uInt32 | code | ) |
| inline

Check for ASCII white space character.

Parameters

  code | A Unicode code point.

Returns
  True if code is an ASCII white space character as defined by C for isspace in the "C" locale (ASCII ' ', '\f', '\n', '\r', '\t' '\v').

Since
  LibreOffice 5.4

## ◆ isHighSurrogate()

SAL_CONSTEXPR bool rtl::isHighSurrogate | ( | sal_uInt32 | code | ) |
| inline

Check for high surrogate.

Parameters

  code | A Unicode code point.

Returns
  True if code is a high surrogate code point (0xD800–0xDBFF).

Since
  LibreOffice 5.0

## ◆ isLowSurrogate()

SAL_CONSTEXPR bool rtl::isLowSurrogate | ( | sal_uInt32 | code | ) |
| inline

Check for low surrogate.

Parameters

  code | A Unicode code point.

Returns
  True if code is a low surrogate code point (0xDC00–0xDFFF).

Since
  LibreOffice 5.0

## ◆ isSurrogate()

SAL_CONSTEXPR bool rtl::isSurrogate | ( | sal_uInt32 | code | ) |
| inline

Check for surrogate.

Parameters

  code | A Unicode code point.

Returns
  True if code is a surrogate code point (0xD800–0xDFFF).

Since
  LibreOffice 6.0

## ◆ isUnicodeCodePoint()

SAL_CONSTEXPR bool rtl::isUnicodeCodePoint | ( | sal_uInt32 | code | ) |
| inline

Check for Unicode code point.

Parameters

  code | An integer.

Returns
  True if code is a Unicode code point.

Since
  LibreOffice 5.2

## ◆ isUnicodeScalarValue()

SAL_CONSTEXPR bool rtl::isUnicodeScalarValue | ( | sal_uInt32 | code | ) |
| inline

Check for Unicode scalar value.

Parameters

  code | An integer.

Returns
  True if code is a Unicode scalar value.

Since
  LibreOffice 6.0

## ◆ operator<<() [1/2]

template<typename charT, typename traits>

std::basic_ostream< charT, traits > & rtl::operator<< | ( | std::basic_ostream< charT, traits > & | stream,
|  | OString const & | rString )

Support for rtl::OString in std::ostream (and thus in CPPUNIT_ASSERT or SAL_INFO macros, for example).

Since
  LibreOffice 4.0

## ◆ operator<<() [2/2]

template<typename charT, typename traits>

std::basic_ostream< charT, traits > & rtl::operator<< | ( | std::basic_ostream< charT, traits > & | stream,
|  | OUString const & | rString )
| inline

Support for rtl::OUString in std::ostream (and thus in CPPUNIT_ASSERT or SAL_INFO macros, for example).

The rtl::OUString is converted to UTF-8.

Since
  LibreOffice 3.5.

## ◆ OStringToOUString()

OUString rtl::OStringToOUString | ( | const OString & | rStr,
|  | rtl_TextEncoding | encoding,
|  | sal_uInt32 | convertFlags = OSTRING_TO_OUSTRING_CVTFLAGS )
| inline

Convert an OString to an OUString, using a specific text encoding.

The lengths of the two strings may differ (e.g., for double-byte encodings, UTF-7, UTF-8).

Parameters

  rStr | an OString to convert.
  encoding | the text encoding to use for conversion.
  convertFlags | flags which control the conversion. Either use OSTRING_TO_OUSTRING_CVTFLAGS, or see http://udk.openoffice.org/cpp/man/spec/textconversion.html for more details.

## ◆ OUStringToOString()

OString rtl::OUStringToOString | ( | const OUString & | rUnicode,
|  | rtl_TextEncoding | encoding,
|  | sal_uInt32 | convertFlags = OUSTRING_TO_OSTRING_CVTFLAGS )
| inline

Convert an OUString to an OString, using a specific text encoding.

The lengths of the two strings may differ (e.g., for double-byte encodings, UTF-7, UTF-8).

Parameters

  rUnicode | an OUString to convert.
  encoding | the text encoding to use for conversion.
  convertFlags | flags which control the conversion. Either use OUSTRING_TO_OSTRING_CVTFLAGS, or see http://udk.openoffice.org/cpp/man/spec/textconversion.html for more details.

## ◆ splitSurrogates()

SAL_CONSTEXPR std::size_t rtl::splitSurrogates | ( | sal_uInt32 | code,
|  | sal_Unicode * | output )
| inline

Split a Unicode code point into UTF-16 code units.

Parameters

  code | A Unicode code point.
  output | A non-null pointer to an array with space for at least two sal_Unicode UTF-16 code units.

Returns
  The number of UTF-16 code units placed into the output (either one or two).

Since
  LibreOffice 5.3

## ◆ toAsciiLowerCase()

SAL_CONSTEXPR sal_uInt32 rtl::toAsciiLowerCase | ( | sal_uInt32 | code | ) |
| inline

Convert a character, if ASCII, to lower case.

Parameters

  code | A Unicode code point.

Returns
  code converted to ASCII lower case.

Since
  LibreOffice 4.2

## ◆ toAsciiUpperCase()

SAL_CONSTEXPR sal_uInt32 rtl::toAsciiUpperCase | ( | sal_uInt32 | code | ) |
| inline

Convert a character, if ASCII, to upper case.

Parameters

  code | A Unicode code point.

Returns
  code converted to ASCII upper case.

Since
  LibreOffice 4.2