String
extension String
-
Returns space-separated hex codes of unicode characters in self, like “66 6c 61 67 73 20 1f1e7 1f1f7 1f1f3 1f1ff”
Declaration
Swift
var hexDump: String { get } -
Returns an array of substrings in self that matched the regex pattern
Declaration
Swift
func matches(for regex: String) -> [String]Parameters
regexpattern
Return Value
[String]
-
Check if self is blank (is empty or consists of whitespace characters only)
Declaration
Swift
func isBlank() -> BoolReturn Value
true if self is blank
-
Returns true if self matches the regex pattern
Declaration
Swift
func doesMatch(regex: String) -> BoolParameters
regexpattern
Return Value
Bool
-
Returns UUID (if any) found in self
- Example: “https://my-app/product_images%2F08D41FB1-8B2E-4F6F-977A-BFA876AEF775.png” -> “08D41FB1-8B2E-4F6F-977A-BFA876AEF775”
Declaration
Swift
func extractUUID() -> StringReturn Value
String that matched the UUID pattern or empty string
-
Returns a copy of self with 1st letter capitalized
Declaration
Swift
func capitalizingFirstLetter() -> String -
Capitalizes 1st letter
Declaration
Swift
mutating func capitalizeFirstLetter() -
Capitalizes 1st letter and inserts a space before any other capital letter
Declaration
Swift
var camelCaseSplit: String { get }
String Extension Reference