Skip to main content
Version: 10.8.0

Function: isShortString()

isShortString(str): boolean

Defined in: src/utils/shortString.ts:33

Test if a string is a Cairo short string (string with less or equal 31 characters)

Parameters​

str​

string

the string to test

Returns​

boolean

Returns true if the string has less than or equal to 31 characters, otherwise false.

Example​

const result = shortString.isShortString('Hello, world!');
// result = true