Skip to main content

Text.ends_with

ends_withsuffixcase_sensitivity

Group: Text
Aliases: check suffix

Documentation

Checks whether self ends with suffix.

Arguments

  • suffix: The suffix to see if self ends with.
  • case_sensitivity: Specifies if the text values should be compared case sensitively.

Examples

See if the text "Hello World" ends with the specified suffix.

      "Hello World".ends_with "World" == True
"Hello World".ends_with "world" == False
"Hello World".ends_with "world" Case_Sensitivity.Insensitive == True

Remarks

Unicode Equality

The definition of equality includes Unicode canonicalization. I.e. two texts are equal if they are identical after canonical decomposition. This ensures that different ways of expressing the same character in the underlying binary representation are considered equal.