View source code
Display the source code in std/uni.d from which this page was generated on github.
Report a bug
If you spot a problem with this page, click here to create a Bugzilla 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 using local clone.

Struct std.uni.unicode

A single entry point to lookup Unicode code point sets by name or alias of a block, script or general category.

struct unicode ;

It uses well defined standard rules of property name lookup. This includes fuzzy matching of names, so that 'White_Space', 'white-SpAce' and 'whitespace' are all considered equal and yield the same set of white space characters.

Properties

NameTypeDescription
opDispatch[get] autoPerforms the lookup of set of code points with compile-time correctness checking. This short-cut version combines 3 searches: across blocks, scripts, and common binary properties.

Methods

NameDescription
opCall The same lookup across blocks, scripts, or binary properties, but performed at run-time. This version is provided for cases where name is not known beforehand; otherwise compile-time checked opDispatch is typically a better choice.
parseSet Parse unicode codepoint set from given range using standard regex syntax '[...]'. The range is advanced skiping over regex set definition. casefold parameter determines if the set should be casefolded - that is include both lower and upper case versions for any letters in the set.

Inner structs

NameDescription
block Narrows down the search for sets of code points to all Unicode blocks.
hangulSyllableType Fetch a set of code points that have the given hangul syllable type.
script Narrows down the search for sets of code points to all Unicode scripts.

Authors

Dmitry Olshansky

License

Boost License 1.0.