Unicode.Set.match-question-mark
You're seeing just the macro
match-question-mark, go back to Unicode.Set module for more information.
Returns a boolean based upon whether var
matches the provided unicode_set.
Arguments
varis any integer variable (since codepoints are integers)unicode_setis a binary representation of a unicode set. An exception will be raised ifunicode_setis not a compile time binary
Returns
trueorfalse
Examples
Unicode.Set.match?/2can be used withdefguard/1. For example:
defguard is_lower(codepoint) when Unicode.Set.match?(codepoint, "[[:Lu:]]")- Or as a guard clause itself:
def my_function(<< codepoint :: utf8, _rest :: binary>>)
when Unicode.Set.match?(codepoint, "[[:Lu:]]")