LibreOffice Module comphelper (master) 1
Classes | Namespaces | Functions
string.hxx File Reference
#include <sal/config.h>
#include <algorithm>
#include <vector>
#include <comphelper/comphelperdllapi.h>
#include <sal/types.h>
#include <rtl/strbuf.hxx>
#include <rtl/ustrbuf.hxx>
#include <com/sun/star/uno/Sequence.h>
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/lang/Locale.hpp>
Include dependency graph for string.hxx:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  comphelper::string::NaturalStringSorter
 

Namespaces

namespace  com
 
namespace  com::sun
 
namespace  com::sun::star
 
namespace  com::sun::star::i18n
 
namespace  com::sun::star::uno
 
namespace  comphelper
 
namespace  comphelper::string
 
namespace  comphelper::string::detail
 

Functions

OUStringBuffer & comphelper::string::remove (OUStringBuffer &rIn, sal_Unicode c)
 Removes all occurrences of a character from within the source string. More...
 
OString comphelper::string::stripStart (const OString &rIn, char c)
 Strips occurrences of a character from the start of the source string. More...
 
std::string_view comphelper::string::stripStart (std::string_view rIn, char c)
 
OUString comphelper::string::stripStart (const OUString &rIn, sal_Unicode c)
 Strips occurrences of a character from the start of the source string. More...
 
std::u16string_view comphelper::string::stripStart (std::u16string_view rIn, sal_Unicode c)
 
OString comphelper::string::stripEnd (const OString &rIn, char c)
 Strips occurrences of a character from the end of the source string. More...
 
std::string_view comphelper::string::stripEnd (std::string_view rIn, char c)
 
OUString comphelper::string::stripEnd (const OUString &rIn, sal_Unicode c)
 Strips occurrences of a character from the end of the source string. More...
 
std::u16string_view comphelper::string::stripEnd (std::u16string_view rIn, sal_Unicode c)
 
OString comphelper::string::strip (const OString &rIn, char c)
 Strips occurrences of a character from the start and end of the source string. More...
 
std::string_view comphelper::string::strip (std::string_view rIn, char c)
 
OUString comphelper::string::strip (const OUString &rIn, sal_Unicode c)
 Strips occurrences of a character from the start and end of the source string. More...
 
std::u16string_view comphelper::string::strip (std::u16string_view rIn, sal_Unicode c)
 
sal_Int32 comphelper::string::getTokenCount (std::string_view rIn, char cTok)
 Returns number of tokens in an OUString. More...
 
sal_Int32 comphelper::string::getTokenCount (std::u16string_view rIn, sal_Unicode cTok)
 Returns number of tokens in an OUString. More...
 
OUString comphelper::string::reverseString (std::u16string_view rStr)
 Reverse an OUString's UTF-16 code units. More...
 
OUString comphelper::string::reverseCodePoints (OUString const &str)
 Reverse an OUString's Unicode code points. More...
 
template<typename B >
B & comphelper::string::detail::truncateToLength (B &rBuffer, sal_Int32 nLen)
 
OUStringBuffer & comphelper::string::truncateToLength (OUStringBuffer &rBuffer, sal_Int32 nLength)
 Truncate a buffer to a given length. More...
 
template<typename B , typename U >
B & comphelper::string::detail::padToLength (B &rBuffer, sal_Int32 nLen, U cFill)
 
OStringBuffer & comphelper::string::padToLength (OStringBuffer &rBuffer, sal_Int32 nLength, char cFill='\0')
 Pad a buffer to a given length using a given char. More...
 
OUStringBuffer & comphelper::string::padToLength (OUStringBuffer &rBuffer, sal_Int32 nLength, sal_Unicode cFill='\0')
 
void comphelper::string::replaceAt (OUStringBuffer &rIn, sal_Int32 nIndex, sal_Int32 nCount, std::u16string_view newStr)
 Similar to OUString::replaceAt, but for an OUStringBuffer. More...
 
OUString comphelper::string::setToken (const OUString &rIn, sal_Int32 nToken, sal_Unicode cTok, std::u16string_view rNewToken)
 Replace a token in a string. More...
 
sal_Int32 comphelper::string::indexOfAny (std::u16string_view rIn, sal_Unicode const *const pChars, sal_Int32 const nPos)
 Find any of a list of code units in the string. More...
 
OUString comphelper::string::removeAny (std::u16string_view rIn, sal_Unicode const *const pChars)
 Remove any of a list of code units in the string. More...
 
COMPHELPER_DLLPUBLIC OUString comphelper::string::convertCommaSeparated (css::uno::Sequence< OUString > const &i_rSeq)
 Convert a sequence of strings to a single comma separated string. More...
 
OString comphelper::string::join (std::string_view rSeparator, const std::vector< OString > &rSequence)
 Return a string which is the concatenation of the strings in the sequence. More...
 
sal_uInt32 comphelper::string::decimalStringToNumber (std::u16string_view str)
 Convert a decimal string to a number. More...
 
std::vector< OUString > comphelper::string::split (std::u16string_view rStr, sal_Unicode cSeparator)
 
uno::Sequence< OUString > comphelper::string::convertCommaSeparated (std::u16string_view i_rString)
 Convert a single comma separated string to a sequence of strings. More...
 
COMPHELPER_DLLPUBLIC sal_Int32 comphelper::string::compareNatural (const OUString &rLHS, const OUString &rRHS, const css::uno::Reference< css::i18n::XCollator > &rCollator, const css::uno::Reference< css::i18n::XBreakIterator > &rBI, const css::lang::Locale &rLocale)
 Compares two strings using natural order. More...
 
bool comphelper::string::isdigitAsciiString (std::string_view rString)
 Determine if an OString contains solely ASCII numeric digits. More...
 
bool comphelper::string::isdigitAsciiString (std::u16string_view rString)
 Determine if an OUString contains solely ASCII numeric digits. More...
 
OUString comphelper::string::sanitizeStringSurrogates (const OUString &rString)
 Sanitize an OUString to not have invalid surrogates. More...