String
struct String
-
encode String and converts it to Data format using UTF-8
Declaration
Swift
func encodeStringData() -> Data
-
Returns russian standart of phonetic metrics for minutes of given Int minutes value
Declaration
Swift
static func toMinutes(_ number: Int) -> String
Parameters
number
minutes you want to use
Return Value
String as minute(s) in Russian phonetic standart
-
Returns russian standart of phonetic metrics for hours of given Int hours value
Declaration
Swift
static func toHours(_ number: Int) -> String
Parameters
number
hours you want to use
Return Value
String as hour(s) in Russian phonetic standart
-
Returns russian standart of phonetic metrics for days of given Int minutes value
Declaration
Swift
static func toDays(_ number: Int) -> String
Parameters
number
days you want to use
Return Value
String as day(s) in Russian phonetic standart
-
Length of string (characters count)
Declaration
Swift
public var length: Int
-
Character by index
Declaration
Swift
public subscript (i: Int) -> Character
Parameters
i
index
-
Character as String by index
Declaration
Swift
public subscript (i: Int) -> String
Parameters
i
index
-
Substring with Range
Declaration
Swift
public subscript (r: CountableRange<Int>) -> String
Parameters
r
range of indexes
-
Substring with Closed Range
Declaration
Swift
public subscript (r: CountableClosedRange<Int>) -> String
Parameters
r
range of indexes
-
Converts string to Double?
Declaration
Swift
public var toDouble: Double?
-
Converts string to Int?
Declaration
Swift
public var toInt: Int?
-
Inserts substring in file or url path before extension (last
.
character)Declaration
Swift
public func appendSuffixBeforeExtension(_ suffix: String) -> String
Parameters
suffix
substring to insert
Return Value
modified string
-
Return truncated string by specified length, and append trailing stirng (if any)
Declaration
Swift
public func truncate(_ length: Int, trailing: String? = nil) -> String
Parameters
length
max length for truncation
trailing
trailing appendix
Return Value
Result string
-
Checks is string contans a valid e-mail address
Declaration
Swift
public var isEmail: Bool
-
Applies specified format to string
Declaration
Swift
public func applyFormat(_ format: String, placeholderChar placeholder: Character = "#") -> String
Parameters
format
Format string
placeholder
Placeholder character used in format string
Return Value
Formatted string
-
Checks string for completly applying specified format
Declaration
Swift
public func checkFormat(_ format: String, placeholderChar placeholder: Character = "#") -> Bool
Parameters
format
Format string
placeholder
Placeholder character used in format string
Return Value
Result of check
-
Extracts digits from the string
Declaration
Swift
public var digitsOnly: String
-
Undocumented
Declaration
Swift
var glyphCount: Int
-
Returns Boolean value if String contain only one emoji and only
Declaration
Swift
var isSingleEmoji: Bool
-
Returns Boolean value if String has any emoji symbol
Declaration
Swift
var containsEmoji: Bool
-
Returns if String consists only of emojis
Declaration
Swift
var containsOnlyEmoji: Bool
-
Undocumented
Declaration
Swift
var emojiString: String
-
Returns Array value of String(s) with emojies in particular given String
Declaration
Swift
var emojis: [String]
-
Counts number of instances of the input inside String
Declaration
Swift
public func count(_ substring: String) -> Int
-
Counts whitespace & new lines
Declaration
Swift
public func isOnlyEmptySpacesAndNewLineCharacters() -> Bool
-
Checks if string is empty or consists only of whitespace and newline characters
Declaration
Swift
public var isBlank: Bool
-
Trims white space and new line characters
Declaration
Swift
public mutating func trim()
-
Trims white space and new line characters, returns a new string
Declaration
Swift
public func trimmed() -> String
-
Position of begining character of substing
Declaration
Swift
public func positionOfSubstring(_ subString: String, caseInsensitive: Bool = false, fromEnd: Bool = false) -> Int
-
split string using a spearator string, returns an array of string
Declaration
Swift
public func split(_ separator: String) -> [String]
-
split string with delimiters, returns an array of string
Declaration
Swift
public func split(_ characters: CharacterSet) -> [String]
-
Returns count of words in string
Declaration
Swift
public var countofWords: Int
-
Returns count of paragraphs in string
Declaration
Swift
public var countofParagraphs: Int
-
Returns if String is a number
Declaration
Swift
public func isNumber() -> Bool
-
Extracts URLS from String
Declaration
Swift
public var extractURLs: [URL]
-
Checking if String contains input with comparing options
Declaration
Swift
public func contains(_ find: String, compareOption: NSString.CompareOptions) -> Bool
-
Converts String to Float
Declaration
Swift
public func toFloat() -> Float?
-
Converts String to Bool
Declaration
Swift
public func toBool() -> Bool?
-
Returns the first index of the occurency of the character in String
Declaration
Swift
public func getIndexOf(_ char: Character) -> Int?
-
Converts String to NSString
Declaration
Swift
public var toNSString: NSString
-
Returns bold NSAttributedString
Declaration
Swift
public func bold() -> NSAttributedString
-
Returns underlined NSAttributedString
Declaration
Swift
public func underline() -> NSAttributedString
-
Returns italic NSAttributedString
Declaration
Swift
public func italic() -> NSAttributedString
-
EZSE: Returns NSAttributedString
Declaration
Swift
public func color(_ color: UIColor) -> NSAttributedString
-
Returns NSAttributedString
Declaration
Swift
public func colorSubString(_ subString: String, color: UIColor) -> NSMutableAttributedString
-
Checks if String contains Emoji
Declaration
Swift
public func includesEmoji() -> Bool
-
copy string to pasteboard
Declaration
Swift
public func addToPasteboard()
-
Undocumented
Declaration
Swift
public func urlEncoded() -> String
-
Undocumented
Declaration
Swift
public func urlDecoded() -> String
-
Undocumented
Declaration
Swift
init(_ value: Float, precision: Int)
-
Undocumented
Declaration
Swift
init(_ value: Double, precision: Int)