StringUtil
Some assorted utility methods for dealing with Strings.
Properties
Functions
Link copied to clipboard
Joins the Strings in the given array together into a single String using the specified separator String.
Joins the Strings in the given List together into a single String using the specified separator String.
Link copied to clipboard
open fun replaceAll(template: CharSequence, sources: Array<String>, destinations: Array<CharSequence>): CharSequence
This method is based on Android's replace and extends its functionality by replacing all instances of each String specified in the sources parameter with the associated destination CharSequence.
Link copied to clipboard
Formats the given time duration value (in milliseconds) as a time string in one of the following formats:
- HH:MM:SS where the timeframe is greater than 1 hour
- MM:SS where the timeframe is less than an hour
- M:SS where the timeframe is less than ten minutes