General Utility Library for C++14  2.11
Functions
gul14/case_ascii.h

Detailed Description

Converting ASCII characters to lowercase or uppercase.

Functions

constexpr char gul14::lowercase_ascii (char c) noexcept
 Return the ASCII lowercase equivalent of the given character (or the unchanged character, if it is not an ASCII letter). More...
 
GUL_EXPORT std::string gul14::lowercase_ascii (gul14::string_view str)
 Return a copy of the given string in which all ASCII characters are replaced by their lowercase equivalents. More...
 
GUL_EXPORT std::string & gul14::lowercase_ascii_inplace (std::string &str) noexcept
 Replace all ASCII characters in a string by their lowercase equivalents. More...
 
constexpr char gul14::uppercase_ascii (char c) noexcept
 Return the ASCII uppercase equivalent of the given character (or the unchanged character, if it is not an ASCII letter). More...
 
GUL_EXPORT std::string gul14::uppercase_ascii (gul14::string_view str)
 Return a copy of the given string in which all ASCII characters are replaced by their uppercase equivalents. More...
 
GUL_EXPORT std::string & gul14::uppercase_ascii_inplace (std::string &str) noexcept
 Replace all ASCII characters in a string by their uppercase equivalents. More...
 

Function Documentation

◆ lowercase_ascii() [1/2]

constexpr char gul14::lowercase_ascii ( char  c)
constexprnoexcept

Return the ASCII lowercase equivalent of the given character (or the unchanged character, if it is not an ASCII letter).

Parameters
cThe original character.
Since
GUL version 1.2
See also
lowercase_ascii(gul14::string_view), lowercase_ascii_inplace(std::string &), uppercase_ascii(char)

Referenced by gul14::contains_nocase(), gul14::ends_with_nocase(), gul14::equals_nocase(), gul14::lowercase_ascii(), gul14::lowercase_ascii_inplace(), and gul14::starts_with_nocase().

◆ lowercase_ascii() [2/2]

std::string gul14::lowercase_ascii ( gul14::string_view  str)

Return a copy of the given string in which all ASCII characters are replaced by their lowercase equivalents.

Parameters
strThe original string.
Since
GUL version 1.2
See also
lowercase_ascii(char), lowercase_ascii_inplace(std::string &), uppercase_ascii(gul14::string_view)

References gul14::lowercase_ascii().

◆ lowercase_ascii_inplace()

std::string & gul14::lowercase_ascii_inplace ( std::string &  str)
noexcept

Replace all ASCII characters in a string by their lowercase equivalents.

This function modifies the original string and returns a reference to it (which may be helpful for chaining function calls).

Parameters
strThe string to be modified.
Returns
a reference to the string argument.
Since
GUL version 1.2
See also
lowercase_ascii(char), lowercase_ascii(gul14::string_view), uppercase_ascii_inplace(std::string &)

References gul14::lowercase_ascii().

◆ uppercase_ascii() [1/2]

constexpr char gul14::uppercase_ascii ( char  c)
constexprnoexcept

Return the ASCII uppercase equivalent of the given character (or the unchanged character, if it is not an ASCII letter).

Parameters
cThe original character.
Since
GUL version 1.2
See also
uppercase_ascii(gul14::string_view), uppercase_ascii_inplace(std::string &), lowercase_ascii(char)

Referenced by gul14::uppercase_ascii(), and gul14::uppercase_ascii_inplace().

◆ uppercase_ascii() [2/2]

std::string gul14::uppercase_ascii ( gul14::string_view  str)

Return a copy of the given string in which all ASCII characters are replaced by their uppercase equivalents.

Parameters
strThe original string.
Since
GUL version 1.2
See also
uppercase_ascii(char), uppercase_ascii_inplace(std::string &), lowercase_ascii(gul14::string_view)

References gul14::uppercase_ascii().

◆ uppercase_ascii_inplace()

std::string & gul14::uppercase_ascii_inplace ( std::string &  str)
noexcept

Replace all ASCII characters in a string by their uppercase equivalents.

This function modifies the original string and returns a reference to it (which may be helpful for chaining function calls).

Parameters
strThe string to be modified.
Returns
a reference to the string argument.
Since
GUL version 1.2
See also
uppercase_ascii(char), uppercase_ascii(gul14::string_view), lowercase_ascii_inplace(std::string &)

References gul14::uppercase_ascii().