Skip to content

Commit

Permalink
Update String+Expanding.swift
Browse files Browse the repository at this point in the history
  • Loading branch information
rismay-luassat committed Jun 25, 2024
1 parent 5346fad commit 495e623
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import Foundation

/// An extension to the `String` class providing a method to expand the tilde in file paths.
extension String {

/// Expands the tilde (`~`) in the string to the user's home directory path.
///
/// This method is useful for converting path strings that use the tilde as a shorthand
Expand All @@ -15,7 +14,8 @@ extension String {
/// // Prints the full path, e.g., "/Users/username/Documents"
/// ```
///
/// - Returns: A new string where the tilde is replaced by the full path of the user's home directory.
/// - Returns: A new string where the tilde is replaced by the full path of the user's home
/// directory.
public func homeExpandedString() -> String {
(self as NSString).expandingTildeInPath
}
Expand Down

0 comments on commit 495e623

Please sign in to comment.