Airship Android SDK
Toggle table of contents
androidJvm
Platform filter
androidJvm
Switch theme
Search in API
Airship Android SDK
urbanairship-core
/
com.urbanairship.util
/
UAStringUtil
UAString
Util
abstract
class
UAStringUtil
A class containing utility methods related to strings.
Members
Constructors
UAString
Util
Link copied to clipboard
constructor
(
)
Functions
base64Decode
Link copied to clipboard
@
Nullable
open
fun
base64Decode
(
@
Nullable
encoded
:
String
)
:
Array
<
Byte
>
Base64 decodes a string.
base64Decoded
String
Link copied to clipboard
@
Nullable
open
fun
base64DecodedString
(
@
Nullable
encoded
:
String
)
:
String
Generates a base 64 decoded string.
byte
To
Hex
Link copied to clipboard
@
NonNull
open
fun
byteToHex
(
@
NonNull
bytes
:
Array
<
Byte
>
)
:
String
Converts the bytes into a hex string.
equals
Link copied to clipboard
open
fun
equals
(
@
Nullable
firstString
:
String
,
@
Nullable
secondString
:
String
)
:
Boolean
Checks if the strings are equal.
is
Empty
Link copied to clipboard
open
fun
isEmpty
(
@
Nullable
stringToCheck
:
String
)
:
Boolean
Checks if the string is empty.
join
Link copied to clipboard
@
NonNull
open
fun
join
(
@
NonNull
c
:
Collection
<
String
>
,
@
NonNull
delimiter
:
String
)
:
String
Append a collection of strings and delimiter.
named
String
Resource
Link copied to clipboard
@
NonNull
open
fun
namedStringResource
(
@
NonNull
context
:
Context
,
@
NonNull
name
:
String
,
@
NonNull
defaultValue
:
String
)
:
String
Retrieves a string resource dynamically by its name.
null
If
Empty
Link copied to clipboard
@
Nullable
open
fun
nullIfEmpty
(
@
Nullable
value
:
String
)
:
String
repeat
Link copied to clipboard
@
NonNull
open
fun
repeat
(
@
NonNull
repeater
:
String
,
times
:
Int
,
@
NonNull
separator
:
String
)
:
String
Builds a string.
sha256
Link copied to clipboard
@
Nullable
open
fun
sha256
(
@
Nullable
value
:
String
)
:
String
Returns the sha256 hex string for a given string.
sha256Digest
Link copied to clipboard
@
Nullable
open
fun
sha256Digest
(
@
Nullable
value
:
String
)
:
Array
<
Byte
>
Generates the sha256 digest for a given string.