@@ -48,7 +48,7 @@ public extension AttributedString {
48
48
/// - range: range of substring where style is applied, `nil` to use the entire string.
49
49
/// - Returns: same instance of the receiver with - eventually - modified attributes.
50
50
@discardableResult
51
- public func add( style: String , range: NSRange ? = nil ) -> AttributedString {
51
+ func add( style: String , range: NSRange ? = nil ) -> AttributedString {
52
52
guard let style = Styles [ style] else { return self }
53
53
return style. add ( to: self , range: range)
54
54
}
@@ -61,7 +61,7 @@ public extension AttributedString {
61
61
/// - range: range of substring where style is applied, `nil` to use the entire string.
62
62
/// - Returns: same instance of the receiver with - eventually - modified attributes.
63
63
@discardableResult
64
- public func add( styles: [ String ] , range: NSRange ? = nil ) -> AttributedString {
64
+ func add( styles: [ String ] , range: NSRange ? = nil ) -> AttributedString {
65
65
guard let styles = Styles [ styles] else { return self }
66
66
return styles. mergeStyle ( ) . set ( to: self , range: range)
67
67
}
@@ -74,7 +74,7 @@ public extension AttributedString {
74
74
/// - range: range of substring where style is applied, `nil` to use the entire string.
75
75
/// - Returns: same instance of the receiver with - eventually - modified attributes.
76
76
@discardableResult
77
- public func set( style: String , range: NSRange ? = nil ) -> AttributedString {
77
+ func set( style: String , range: NSRange ? = nil ) -> AttributedString {
78
78
guard let style = Styles [ style] else { return self }
79
79
return style. set ( to: self , range: range)
80
80
}
@@ -88,7 +88,7 @@ public extension AttributedString {
88
88
/// - range: range of substring where style is applied, `nil` to use the entire string.
89
89
/// - Returns: same instance of the receiver with - eventually - modified attributes.
90
90
@discardableResult
91
- public func set( styles: [ String ] , range: NSRange ? = nil ) -> AttributedString {
91
+ func set( styles: [ String ] , range: NSRange ? = nil ) -> AttributedString {
92
92
guard let styles = Styles [ styles] else { return self }
93
93
return styles. mergeStyle ( ) . set ( to: self , range: range)
94
94
}
@@ -100,7 +100,7 @@ public extension AttributedString {
100
100
/// - range: range of substring where style is applied, `nil` to use the entire string.
101
101
/// - Returns: same instance of the receiver with - eventually - modified attributes.
102
102
@discardableResult
103
- public func add( style: StyleProtocol , range: NSRange ? = nil ) -> AttributedString {
103
+ func add( style: StyleProtocol , range: NSRange ? = nil ) -> AttributedString {
104
104
return style. add ( to: self , range: range)
105
105
}
106
106
@@ -112,7 +112,7 @@ public extension AttributedString {
112
112
/// - range: range of substring where style is applied, `nil` to use the entire string.
113
113
/// - Returns: same instance of the receiver with - eventually - modified attributes.
114
114
@discardableResult
115
- public func add( styles: [ StyleProtocol ] , range: NSRange ? = nil ) -> AttributedString {
115
+ func add( styles: [ StyleProtocol ] , range: NSRange ? = nil ) -> AttributedString {
116
116
return styles. mergeStyle ( ) . add ( to: self , range: range)
117
117
}
118
118
@@ -123,7 +123,7 @@ public extension AttributedString {
123
123
/// - range: range of substring where style is applied, `nil` to use the entire string.
124
124
/// - Returns: same instance of the receiver with - eventually - modified attributes.
125
125
@discardableResult
126
- public func set( style: StyleProtocol , range: NSRange ? = nil ) -> AttributedString {
126
+ func set( style: StyleProtocol , range: NSRange ? = nil ) -> AttributedString {
127
127
return style. set ( to: self , range: range)
128
128
}
129
129
@@ -135,7 +135,7 @@ public extension AttributedString {
135
135
/// - range: range of substring where style is applied, `nil` to use the entire string.
136
136
/// - Returns: same instance of the receiver with - eventually - modified attributes.
137
137
@discardableResult
138
- public func set( styles: [ StyleProtocol ] , range: NSRange ? = nil ) -> AttributedString {
138
+ func set( styles: [ StyleProtocol ] , range: NSRange ? = nil ) -> AttributedString {
139
139
return styles. mergeStyle ( ) . set ( to: self , range: range)
140
140
}
141
141
@@ -146,7 +146,7 @@ public extension AttributedString {
146
146
/// - range: range of substring where style will be removed, `nil` to use the entire string.
147
147
/// - Returns: same instance of the receiver with - eventually - modified attributes.
148
148
@discardableResult
149
- public func removeAttributes( _ keys: [ NSAttributedString . Key ] , range: NSRange ) -> Self {
149
+ func removeAttributes( _ keys: [ NSAttributedString . Key ] , range: NSRange ) -> Self {
150
150
keys. forEach { self . removeAttribute ( $0, range: range) }
151
151
return self
152
152
}
@@ -155,7 +155,7 @@ public extension AttributedString {
155
155
///
156
156
/// - Parameter style: style to use.
157
157
/// - Returns: same instance of the receiver with - eventually - modified attributes.
158
- public func remove( _ style: StyleProtocol ) -> Self {
158
+ func remove( _ style: StyleProtocol ) -> Self {
159
159
self . removeAttributes ( Array ( style. attributes. keys) , range: NSMakeRange ( 0 , self . length) )
160
160
return self
161
161
}
0 commit comments