Skip to content

Commit

Permalink
make it public
Browse files Browse the repository at this point in the history
  • Loading branch information
ConfusedVorlon committed Apr 22, 2021
1 parent 1bd3b0f commit 02c36ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/HSHelpers/String+HS.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public extension LosslessStringConvertible {
}

//https://stackoverflow.com/questions/24092884/get-nth-character-of-a-string-in-swift-programming-language/38215613#38215613
extension StringProtocol {
public extension StringProtocol {
subscript(_ offset: Int) -> Element { self[index(startIndex, offsetBy: offset)] }
subscript(_ range: Range<Int>) -> SubSequence { prefix(range.lowerBound+range.count).suffix(range.count) }
subscript(_ range: ClosedRange<Int>) -> SubSequence { prefix(range.lowerBound+range.count).suffix(range.count) }
Expand Down

0 comments on commit 02c36ff

Please sign in to comment.