use std::string;
Explore this module further in the Mover Registry: @sage/utils

Constants

Number difference between lowercase (e.g. “a”) and uppercase (e.g. “A”) values.
const CHAR_CASE_OFFSET: u8 = 0x20;
Number representation of ‘a’.
const CHAR_LOWER_A: u8 = 0x61;
Number representation of ‘z’.
const CHAR_LOWER_Z: u8 = 0x7A;
Number representation of ‘A’.
const CHAR_UPPER_A: u8 = 0x41;
Number representation of ‘Z’.
const CHAR_UPPER_Z: u8 = 0x5A;
Number representation of ‘0’.
const CHAR_ZERO: u8 = 0x30;
Number representation of ‘9’.
const CHAR_NINE: u8 = 0x39;
Number representation of ’-’.
const CHAR_DASH: u8 = 0x2D;

Functions

is_valid_name

Returns true or false based on whether the name is valid.
public fun is_valid_name(name: &std::string::String, min_length: u64, max_length: u64): bool

to_lowercase

Returns the lowercase value of the passed String.
public fun to_lowercase(name: &std::string::String): std::string::String

to_uppercase

Returns the uppercase value of the passed String.
public fun to_uppercase(name: &std::string::String): std::string::String