View source code
Display the source code in std/uni.d from which thispage was generated on github.
Report a bug
If you spot a problem with this page, click here to create aGitHub issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.Requires a signed-in GitHub account. This works well for small changes.If you'd like to make larger changes you may want to consider usinglocal clone.

Function std.uni.toUpperSpecial

Converts s to uppercase using locale-aware special casing rules from Unicode 3.13 Section 3.13. Unlike toUpper, this function handles conditional casing rules that depend on surrounding context and language, such as:

string toUpperSpecial(
  string s,
  CasingLanguage lang
) @trusted;

  • Turkish/Azeri: lowercase i (U+0069) uppercases to dotted capital I (U+0130), and dotless i (U+0131) uppercases to plain I (U+0049).

The existing toUpper handles only the unconditional mappings from SpecialCasing.txt. This function adds the conditional rules that require knowledge of the preceding and following characters.

Parameters

NameDescription
s the string to convert
lang the language context to use for language-sensitive rules

Returns

A newly allocated string with the locale-aware uppercase mapping applied.

Authors

Dmitry Olshansky

License

Boost License 1.0.