Str class

Utility class for generating and manipulating strings in Flint Dart

Constructors

Str()

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

camel(String text) → String
Convert a string to camelCase
capitalize(String text) → String
Capitalize the first letter of a string
otp([int length = 6]) → String
Generate a random numeric OTP (e.g. 6 digits)
random([int length = 16]) → String
Generate a random alphanumeric string
randomLetters([int length = 10]) → String
Generate a random alphabet-only string
randomNumbers([int length = 6]) → String
Generate a random numeric string
slugify(String text) → String
Create a URL-friendly slug from any string
snake(String text) → String
Convert a string to snake_case
token([int length = 32]) → String
Generate a secure random token (base64-like)
uuid() → String
Generate a UUID (v4)