String
public extension String
The String extension
-
Returns a localized string
Declaration
Swift
func localized(withComment: String? = nil) -> StringParameters
withCommentComment for localization.
Return Value
Returns a substring
-
Returns a string, up to the given maximum length, containing the final elements of the collection.
Declaration
Swift
func suffix(startAt: Int) -> StringParameters
startAtThe start character of elements to get the suffix string.
Return Value
Returns a substring
-
Calculates the string height based on UIFont
Declaration
Swift
func height(withConstrainedWidth width: CGFloat, font: UIFont) -> CGFloatParameters
widththe UIView width
fontthe UIFont
Return Value
the String height
-
Format amount to double
Declaration
Swift
func formatAmountToDouble() -> DoubleReturn Value
double value
-
Get FX Rate with four decimal
Declaration
Swift
func getFxRateWithFourDecimal() -> StringReturn Value
return string with four decimal
-
Format amount for currency code using users locale
Declaration
Swift
func formatToCurrency(with currencyCode: String?) -> StringParameters
currencyCodecurrency code
Return Value
a formatted amount string
View on GitHub