Unicode.Set.match-question-mark

You're seeing just the macro match-question-mark, go back to Unicode.Set module for more information.
Link to this macro

match?(var, unicode_set)

View Source (macro)

Returns a boolean based upon whether var matches the provided unicode_set.

Arguments

  • var is any integer variable (since codepoints are integers)

  • unicode_set is a binary representation of a unicode set. An exception will be raised if unicode_set is not a compile time binary

Returns

  • true or false

Examples

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:]]")