String
extension String
-
Returns a new string, converting the path to a canonical absolute path.
Declaration
Swift
public func absolutePathStandardized() -> StringReturn Value
A new
String. -
Count the number of occurrences of the given character in
selfDeclaration
Swift
public func countOccurrences(of character: Character) -> IntParameters
characterCharacter to count
Return Value
Number of times
characteroccurs inself -
If self is a path, this method can be used to get a path expression relative to a root directory
Declaration
Swift
public func path(relativeTo rootDirectory: String) -> String
View on GitHub
Install in Dash
String Extension Reference