UAStringUtil

abstract class UAStringUtil

A class containing utility methods related to strings.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
Base64 decodes a string.
Link copied to clipboard
Generates a base 64 decoded string.
Link copied to clipboard
open fun byteToHex(@NonNull bytes: Array<Byte>): String
Converts the bytes into a hex string.
Link copied to clipboard
open fun equals(@Nullable firstString: String, @Nullable secondString: String): Boolean
Checks if the strings are equal.
Link copied to clipboard
Generates a base64 encoded HmacSHA256 signed value.
Link copied to clipboard
open fun isEmpty(@Nullable stringToCheck: String): Boolean
Checks if the string is empty.
Link copied to clipboard
open fun join(@NonNull c: Collection<String>, @NonNull delimiter: String): String
Append a collection of strings and delimiter.
Link copied to clipboard
open fun namedStringResource(@NonNull context: Context, @NonNull name: String, @NonNull defaultValue: String): String
Retrieves a string resource dynamically by its name.
Link copied to clipboard
Link copied to clipboard
open fun repeat(@NonNull repeater: String, times: Int, @NonNull separator: String): String
Builds a string.
Link copied to clipboard
open fun sha256(@Nullable value: String): String
Returns the sha256 hex string for a given string.
Link copied to clipboard
Generates the sha256 digest for a given string.