LibreOffice Module o3tl (master) 1
Namespaces | Functions
string_view.hxx File Reference
#include <sal/config.h>
#include <cassert>
#include <cstddef>
#include <string>
#include <string_view>
#include <o3tl/intcmp.hxx>
#include <rtl/character.hxx>
#include <rtl/ustring.h>
#include <rtl/math.h>
#include <sal/types.h>
Include dependency graph for string_view.hxx:

Go to the source code of this file.

Namespaces

namespace  o3tl
 
namespace  o3tl::internal
 

Functions

bool o3tl::equalsAscii (std::u16string_view s1, std::string_view s2)
 
int o3tl::compareToAscii (std::u16string_view s1, std::string_view s2)
 
bool o3tl::equalsIgnoreAsciiCase (std::u16string_view s1, std::u16string_view s2)
 
bool o3tl::equalsIgnoreAsciiCase (std::u16string_view s1, std::string_view s2)
 
bool o3tl::equalsIgnoreAsciiCase (std::string_view s1, std::string_view s2)
 
int o3tl::compareToIgnoreAsciiCase (std::u16string_view s1, std::u16string_view s2)
 
bool o3tl::matchIgnoreAsciiCase (std::u16string_view s1, std::u16string_view s2, sal_Int32 fromIndex=0)
 
bool o3tl::matchIgnoreAsciiCase (std::u16string_view s1, std::string_view s2, sal_Int32 fromIndex=0)
 
bool o3tl::endsWithIgnoreAsciiCase (std::u16string_view s1, std::u16string_view s2, std::u16string_view *rest=nullptr)
 
bool o3tl::endsWithIgnoreAsciiCase (std::u16string_view s1, std::string_view s2, std::u16string_view *rest=nullptr)
 
template<typename charT , typename traits = std::char_traits<charT>>
std::basic_string_view< charT, traits > o3tl::getToken (std::basic_string_view< charT, traits > sv, charT delimiter, std::size_t &position)
 
std::string_view o3tl::getToken (std::string_view sv, char delimiter, std::size_t &position)
 
std::u16string_view o3tl::getToken (std::u16string_view sv, char16_t delimiter, std::size_t &position)
 
template<typename charT , typename traits = std::char_traits<charT>>
std::basic_string_view< charT, traits > o3tl::getToken (std::basic_string_view< charT, traits > pStr, sal_Int32 nToken, charT cTok, sal_Int32 &rnIndex)
 
std::string_view o3tl::getToken (std::string_view sv, sal_Int32 nToken, char cTok, sal_Int32 &rnIndex)
 
std::u16string_view o3tl::getToken (std::u16string_view sv, sal_Int32 nToken, char16_t cTok, sal_Int32 &rnIndex)
 
std::string_view o3tl::getToken (std::string_view sv, sal_Int32 nToken, char cTok)
 
std::u16string_view o3tl::getToken (std::u16string_view sv, sal_Int32 nToken, char16_t cTok)
 
template<typename charT , typename traits = std::char_traits<charT>>
constexpr bool o3tl::starts_with (std::basic_string_view< charT, traits > sv, std::basic_string_view< charT, traits > x) noexcept
 
template<typename charT , typename traits = std::char_traits<charT>>
constexpr bool o3tl::starts_with (std::basic_string_view< charT, traits > sv, charT x) noexcept
 
template<typename charT , typename traits = std::char_traits<charT>>
constexpr bool o3tl::starts_with (std::basic_string_view< charT, traits > sv, charT const *x)
 
template<typename charT , typename traits = std::char_traits<charT>>
constexpr bool o3tl::ends_with (std::basic_string_view< charT, traits > sv, std::basic_string_view< charT, traits > x) noexcept
 
template<typename charT , typename traits = std::char_traits<charT>>
constexpr bool o3tl::ends_with (std::basic_string_view< charT, traits > sv, charT x) noexcept
 
template<typename charT , typename traits = std::char_traits<charT>>
constexpr bool o3tl::ends_with (std::basic_string_view< charT, traits > sv, charT const *x)
 
constexpr bool o3tl::starts_with (std::string_view sv, std::string_view x) noexcept
 
constexpr bool o3tl::starts_with (std::u16string_view sv, std::u16string_view x) noexcept
 
constexpr bool o3tl::ends_with (std::string_view sv, std::string_view x) noexcept
 
constexpr bool o3tl::ends_with (std::u16string_view sv, std::u16string_view x) noexcept
 
template<typename charT , typename traits = std::char_traits<charT>>
constexpr bool o3tl::starts_with (std::basic_string_view< charT, traits > sv, std::basic_string_view< charT, traits > x, std::basic_string_view< charT, traits > *rest) noexcept
 
template<typename charT , typename traits = std::char_traits<charT>>
constexpr bool o3tl::starts_with (std::basic_string_view< charT, traits > sv, charT x, std::basic_string_view< charT, traits > *rest) noexcept
 
template<typename charT , typename traits = std::char_traits<charT>>
constexpr bool o3tl::starts_with (std::basic_string_view< charT, traits > sv, charT const *x, std::basic_string_view< charT, traits > *rest)
 
template<typename charT , typename traits = std::char_traits<charT>>
constexpr bool o3tl::ends_with (std::basic_string_view< charT, traits > sv, std::basic_string_view< charT, traits > x, std::basic_string_view< charT, traits > *rest) noexcept
 
template<typename charT , typename traits = std::char_traits<charT>>
constexpr bool o3tl::ends_with (std::basic_string_view< charT, traits > sv, charT x, std::basic_string_view< charT, traits > *rest) noexcept
 
template<typename charT , typename traits = std::char_traits<charT>>
constexpr bool o3tl::ends_with (std::basic_string_view< charT, traits > sv, charT const *x, std::basic_string_view< charT, traits > *rest)
 
constexpr bool o3tl::starts_with (std::string_view sv, std::string_view x, std::string_view *rest) noexcept
 
constexpr bool o3tl::starts_with (std::u16string_view sv, std::u16string_view x, std::u16string_view *rest) noexcept
 
constexpr bool o3tl::ends_with (std::string_view sv, std::string_view x, std::string_view *rest) noexcept
 
constexpr bool o3tl::ends_with (std::u16string_view sv, std::u16string_view x, std::u16string_view *rest) noexcept
 
bool o3tl::internal::implIsWhitespace (sal_Unicode c)
 
template<typename charT , typename traits = std::char_traits<charT>>
std::basic_string_view< charT, traits > o3tl::trim (std::basic_string_view< charT, traits > str)
 
auto o3tl::trim (std::string_view str)
 
auto o3tl::trim (std::u16string_view str)
 
sal_Int32 o3tl::toInt32 (std::u16string_view str, sal_Int16 radix=10)
 
sal_Int32 o3tl::toInt32 (std::string_view str, sal_Int16 radix=10)
 
sal_uInt32 o3tl::toUInt32 (std::u16string_view str, sal_Int16 radix=10)
 
sal_uInt32 o3tl::toUInt32 (std::string_view str, sal_Int16 radix=10)
 
sal_Int64 o3tl::toInt64 (std::u16string_view str, sal_Int16 radix=10)
 
sal_Int64 o3tl::toInt64 (std::string_view str, sal_Int16 radix=10)
 
double o3tl::toDouble (std::u16string_view str)
 
double o3tl::toDouble (std::string_view str)
 
sal_uInt32 o3tl::iterateCodePoints (std::u16string_view string, sal_Int32 *indexUtf16, sal_Int32 incrementCodePoints=1)