File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -44,22 +44,20 @@ extension String {
44
44
* trim function removes the specified prefix and suffix from the string.
45
45
*/
46
46
fileprivate mutating func trim( left: String , right: String ) {
47
- self = removePrefix ( prefix: left) // Remove the left prefix from the trace message
48
- self = removeSuffix ( suffix: right) // Remove the right suffix from the trace message
47
+ self = trimmingPrefix ( prefix: left) // Remove the left prefix from the trace message
48
+ self = trimmingSuffix ( suffix: right) // Remove the right suffix from the trace message
49
49
}
50
50
/**
51
51
* removePrefix function removes the specified prefix from the string.
52
- * fixme: rename trimmingPrefix
53
52
*/
54
- fileprivate func removePrefix ( prefix: String ) -> String {
53
+ fileprivate func trimmingPrefix ( prefix: String ) -> String {
55
54
guard self . hasPrefix ( prefix) else { return self } // Check if the trace message has the specified prefix
56
55
return " \( self . dropFirst ( prefix. count) ) " // Remove the prefix from the trace message and return the result
57
56
}
58
57
/**
59
58
* removeSuffix function removes the specified suffix from the string.
60
- * fixme: rename trimmingSuffix
61
59
*/
62
- fileprivate func removeSuffix ( suffix: String ) -> String {
60
+ fileprivate func trimmingSuffix ( suffix: String ) -> String {
63
61
guard self . hasSuffix ( suffix) else { return self } // Check if the trace message has the specified suffix
64
62
return " \( self . dropLast ( suffix. count) ) " // Remove the suffix from the trace message and return the result
65
63
}
You can’t perform that action at this time.
0 commit comments