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.toLowerSpecial
Converts s to lowercase using locale-aware special casing rules
from Unicode 3.13 Section 3.13. Unlike toLower, this function
handles conditional casing rules that depend on surrounding context
and language, such as:
- Final_Sigma: Greek capital sigma (U+03A3) lowercases to final sigma (U+03C2) only when it appears at the end of a word.
- Turkish/Azeri: The dotted I (U+0130) lowercases to plain i, and plain I lowercases to dotless i (U+0131).
- Lithuanian: Capital I and J retain an explicit dot above when lowercased and followed by combining accents.
The existing toLower handles only the unconditional mappings.
This function adds the conditional rules that require
knowledge of the locality, the preceding, and following characters.
Parameters
| Name | Description |
|---|---|
| s | the string to convert |
| lang | the language context to use for language-sensitive rules |
Returns
A newly allocated string with the locale-aware lowercase mapping applied.
Authors
Dmitry Olshansky
License
Copyright © 1999-2026 by the D Language Foundation | Page generated by ddox.