File tree Expand file tree Collapse file tree 1 file changed +0
-26
lines changed Expand file tree Collapse file tree 1 file changed +0
-26
lines changed Original file line number Diff line number Diff line change @@ -120,29 +120,3 @@ extension RawUnexpectedNodesSyntax {
120120 self . init ( raw: raw)
121121 }
122122}
123-
124- extension String {
125- func trimmingCharacters( in charactersToTrim: any BidirectionalCollection < Character > ) -> Substring {
126- let leadingCharacters = countOfSequentialCharacters ( charactersToTrim, in: self )
127- let trailingCharacters = countOfSequentialCharacters ( charactersToTrim, in: reversed ( ) )
128-
129- return dropFirst ( leadingCharacters) . dropLast ( trailingCharacters)
130- }
131- }
132-
133- private func countOfSequentialCharacters(
134- _ charactersToCount: any BidirectionalCollection < Character > ,
135- in characters: any BidirectionalCollection < Character >
136- ) -> Int {
137- var count = 0
138-
139- for character in characters {
140- if charactersToCount. contains ( character) {
141- count += 1
142- } else {
143- break
144- }
145- }
146-
147- return count
148- }
You can’t perform that action at this time.
0 commit comments