Skip to main content

module

string

Implements basic object methods for working with strings.

These are Mojo built-ins, so you don't need to import them.

Structs

Functions

  • ord: Returns an integer that represents the given one-character string.
  • chr: Returns a string based on the given Unicode code point.
  • atol: Parses the given string as a base-10 integer and returns that value.
  • isdigit: Determines whether the given character is a digit [0-9].
  • isupper: Determines whether the given character is an uppercase character. This currently only respects the default "C" locale, i.e. returns True only if the character specified is one of ABCDEFGHIJKLMNOPQRSTUVWXYZ.
  • islower: Determines whether the given character is an lowercase character. This currently only respects the default "C" locale, i.e. returns True only if the character specified is one of abcdefghijklmnopqrstuvwxyz.
  • isspace: Determines whether the given character is a whitespace character. This currently only respects the default "C" locale, i.e. returns True only if the character specified is one of " ".