Browse Source

String: Add asBasic, asLower and asUpper methods

Signed-off-by: falkTX <falktx@falktx.com>
pull/327/head
falkTX 4 years ago
parent
commit
28a88dbd65
1 changed files with 30 additions and 0 deletions
  1. +30
    -0
      distrho/extra/String.hpp

+ 30
- 0
distrho/extra/String.hpp View File

@@ -618,6 +618,36 @@ public:
return *this;
}

/*
* Create a new string where all non-basic characters are converted to '_'.
* @see toBasic()
*/
String asBasic() const noexcept
{
String s(*this);
return s.toBasic();
}

/*
* Create a new string where all ascii characters are converted lowercase.
* @see toLower()
*/
String asLower() const noexcept
{
String s(*this);
return s.toLower();
}

/*
* Create a new string where all ascii characters are converted to uppercase.
* @see toUpper()
*/
String asUpper() const noexcept
{
String s(*this);
return s.toUpper();
}

/*
* Direct access to the string buffer (read-only).
*/


Loading…
Cancel
Save