@@ -45,7 +45,7 @@ export class Wrapper<
4545 }
4646
4747 /**
48- * The method checks if the value of any type is an instance of the `Wrapper` of any, or given opening and closing chars.
48+ * The method checks if the value of any type is an instance of the `Wrapper` of any, or the given opening, closing chars, and text .
4949 * @param value The value of any type to test against the `Wrapper` instance.
5050 * @param opening Optional opening chars of generic type variable `Opening` to check if the given `value` contains.
5151 * @param closing Optional closing chars of generic type variable `Closing` to check if the given `value` contains.
@@ -70,10 +70,10 @@ export class Wrapper<
7070 }
7171
7272 /**
73- * Replaces the closing chars in a given text with a given replacement value at the end of the text.
73+ * Replaces the closing chars in a given ` text` with a given replacement value at the end of the text.
7474 * @param text The text of `string` type in which given `closing` characters are replaced by a given replacement value.
7575 * @param closing The closing chars of the `string` to replace by a given replacement value at the end of the given `text`.
76- * @param replaceValue Replacement value for the given closing characters in the given text.
76+ * @param replaceValue Replacement value for the given ` closing` characters in the given ` text` .
7777 * @returns The return value is the text of `string` type with a replaced closing chars by a given replacement value.
7878 * @angularpackage
7979 */
@@ -88,10 +88,10 @@ export class Wrapper<
8888 }
8989
9090 /**
91- * Replaces the opening chars in a given text with a given replacement value at the end of the text.
91+ * Replaces the opening chars in a given ` text` with a given replacement value at the end of the text.
9292 * @param text The text of `string` type in which the given `opening` chars are replaced by a given replacement value.
9393 * @param opening The opening chars of the `string` to replace by a given replacement value at the beginning of the given `text`.
94- * @param replaceValue Replacement value for the opening characters in the given text.
94+ * @param replaceValue Replacement value for the ` opening` characters in the given ` text` .
9595 * @returns The return value is the text of `string` type with a replaced opening chars by a given replacement value.
9696 * @angularpackage
9797 */
@@ -110,7 +110,7 @@ export class Wrapper<
110110 * @param text The text of the `string` from which given opening and closing chars are removed.
111111 * @param opening The opening chars of the `string` to be removed in the given `text`.
112112 * @param closing The closing chars of the `string` to be removed in the given `text`.
113- * @returns The return value is the text without the given opening and closing chars.
113+ * @returns The return value is the text of string type without the given opening and closing chars.
114114 * @angularpackage
115115 */
116116 public static unwrap ( text : string , opening = '' , closing = '' ) : string {
@@ -138,51 +138,53 @@ export class Wrapper<
138138
139139 //#region instance public methods.
140140 /**
141- * Determines whether the provided `text` has the closing chars of the specified `Wrapper` object.
142- * @param text The text of `string` to test for the existence of the closing chars at the end in it.
143- * @returns The return value is a `boolean` indicating whether the given `text` has the closing of the wrap.
141+ * Determines whether the provided `text` has the closing chars of the specified `Wrapper` object at the end .
142+ * @param text The text of `string` to test for the existence of the closing chars at the end of it.
143+ * @returns The return value is a `boolean` indicating whether the given `text` has the closing chars of the wrap.
144144 * @angularpackage
145145 */
146146 public isClosingIn ( text : string ) : boolean {
147147 return Wrapper . hasClosing ( text , this . closing ) ;
148148 }
149149
150150 /**
151- * Checks if the provided `text` has the opening of a specified `Wrapper` object at the beginning of the text .
151+ * Checks whether the provided `text` has the opening chars of a specified `Wrapper` object at the beginning.
152152 * @param text The text of `string` to test for the existence of the opening chars at the beginning of it.
153- * @returns The return value is a `boolean` indicating whether the given `text` has the opening of the wrap.
153+ * @returns The return value is a `boolean` indicating whether the given `text` has the opening chars of the wrap.
154154 * @angularpackage
155155 */
156156 public isOpeningIn ( text : string ) : boolean {
157157 return Wrapper . hasOpening ( text , this . opening ) ;
158158 }
159159
160160 /**
161- * Replaces the closing chars of the `Wrapper` object in the given text with a given replacement value.
161+ * Replaces the closing chars of the `Wrapper` object in the given `text` with a given replacement value.
162+ * The replacement succeeds if the closing characters exist at the end of the text.
162163 * @param text The text of `string` type in which the closing chars are replaced by given replacement value.
163164 * @param replaceValue The value of `string` type as a replacement for the closing chars at the end of the given `text`.
164- * @returns The return value is the text of a `string` type with replaced closing chars by given replacement value.
165+ * @returns The return value is the text of `string` type with replaced closing chars by given replacement value.
165166 * @angularpackage
166167 */
167168 public replaceClosingIn ( text : string , replaceValue : string ) : string {
168169 return Wrapper . replaceClosing ( text , this . closing , replaceValue ) ;
169170 }
170171
171172 /**
172- * Replaces the opening chars of the `Wrapper` object in the given text with a given replacement value.
173+ * Replaces the opening chars of the `Wrapper` object in the given `text` with a given replacement value.
174+ * The replacement succeeds if the opening characters exist at the beginning of the text.
173175 * @param text The text of `string` type in which the opening chars are replaced by given replacement value.
174176 * @param replaceValue The value of `string` type as a replacement for the opening chars at the beginning of the given `text`.
175- * @returns The return value is the text of a `string` type with replaced opening chars by given replacement value.
177+ * @returns The return value is the text of `string` type with replaced opening chars by given replacement value.
176178 * @angularpackage
177179 */
178180 public replaceOpeningIn ( text : string , replaceValue : string ) : string {
179181 return Wrapper . replaceOpening ( text , this . opening , replaceValue ) ;
180182 }
181183
182184 /**
183- * Returns given text without the opening and closing chars of the wrapper .
185+ * Returns given ` text` without the opening and closing chars of the `Wrapper` object .
184186 * @param text The text of a `string` type to unwrap with the opening and closing chars of the `Wrapper` object.
185- * @returns The return value is the unwrapped text from the opening and closing chars of a `string` type .
187+ * @returns The return value is the text of `string` type unwrapped from the opening and closing chars of the `Wrapper` object .
186188 * @angularpackage
187189 */
188190 public removeWrapIn ( text : string ) : string {
@@ -194,17 +196,19 @@ export class Wrapper<
194196 }
195197
196198 /**
197- * Replaces the closing chars of the `Wrapper` object in the text with the given closing chars.
199+ * Replaces the closing chars of the `Wrapper` object in the text of the `Wrapper` object with the given `closing` chars.
200+ * The replacement succeeds if the closing characters exist at the end of the text.
198201 * @param closing The closing chars of `string` to replace in the text(part of the primitive value).
199- * @returns The return value is the text of string type with replaced closing chars.
202+ * @returns The return value is the text of ` string` type with replaced closing chars.
200203 * @angularpackage
201204 */
202205 public textReplaceClosing ( closing : string ) : string {
203206 return Wrapper . replaceClosing ( this . text , this . closing , closing ) ;
204207 }
205208
206209 /**
207- * Replaces the opening chars of the `Wrapper` object in the text with the given opening chars.
210+ * Replaces the opening chars of the `Wrapper` object in the text of the `Wrapper` object with the given `opening` chars. The replacement
211+ * succeeds if the opening characters exist at the beginning of the text.
208212 * @param opening The opening chars of `string` to replace in the text(part of the primitive value).
209213 * @returns The return value is the text of string type with replaced opening chars.
210214 * @angularpackage
@@ -214,29 +218,27 @@ export class Wrapper<
214218 }
215219
216220 /**
217- * The method returns the text of the `Wrapper` object without the opening and closing chars.
218- * @param opening The opening chars of the generic type variable `CustomOpening` to remove from the beginning of the text of the `Wrapper`
219- * instance. By default, its value is from the opening chars of an instance of `Wrapper`.
220- * @param closing The closing chars of the generic type variable `CustomClosing` to remove from the end of the text of the `Wrapper`
221- * instance. By default, its value is from the closing chars of an instance of `Wrapper`.
222- * @returns The return value is the text of string type without the opening and closing chars.
221+ * The method returns the text of the `Wrapper` object without its opening and closing chars or the given `opening` and `closing` chars.
222+ * @param opening Optional opening chars of `string` type to remove from the beginning of the text of the `Wrapper` instance. By default,
223+ * its value is equal to the opening chars of the `Wrapper` instance.
224+ * @param closing Optional closing chars of `string` type to remove from the end of the text of the `Wrapper` instance. By default, its
225+ * value is equal to the closing chars of the `Wrapper` instance.
226+ * @returns The return value is the text of `string` type without the opening and closing chars of the `Wrapper` object or given `opening`
227+ * and `closing` chars.
223228 * @angularpackage
224229 */
225- public textUnwrap <
226- CustomOpening extends string = Opening ,
227- CustomClosing extends string = Closing
228- > (
229- opening : CustomOpening = this . opening as any ,
230- closing : CustomClosing = this . closing as any
230+ public textUnwrap (
231+ opening : string = this . opening ,
232+ closing : string = this . closing
231233 ) : string {
232234 return Wrapper . unwrap ( this . text , opening , closing ) ;
233235 }
234236
235237 /**
236- * The method returns the text of the `Wrapper` object wrapped by the given opening and closing chars.
238+ * The method returns the text of the `Wrapper` object wrapped by the given ` opening` and ` closing` chars.
237239 * @param opening The opening chars of a generic type variable `TextOpening` to wrap the text of the `Wrapper` instance.
238240 * @param closing The closing chars of a generic type variable `TextClosing` to wrap the text of the `Wrapper` instance.
239- * @returns The return value is wrapped text by given opening and closing chars of generic type `Wrapped`.
241+ * @returns The return value is the text wrapped by given ` opening` and closing ` chars` of generic type `Wrapped`.
240242 * @angularpackage
241243 */
242244 public textWrap < TextOpening extends string , TextClosing extends string > (
@@ -274,37 +276,33 @@ export class Wrapper<
274276 }
275277
276278 /**
277- * The method returns the primitive value of a specified `Wrapper` object with unwrapped text from its opening and closing chars or the
278- * given `opening` and `closing` chars.
279- * @param opening The opening chars of the generic type variable `CustomOpening` to remove from the beginning of the text of the `Wrapper`
280- * instance. By default, its value is from the opening chars of an instance of `Wrapper`.
281- * @param closing The closing chars of the generic type variable `CustomClosing` to remove from the end of the text of the `Wrapper`
282- * instance. By default, its value is from the closing chars of an instance of `Wrapper`.
283- * @returns The return value is the primitive value of `string` type with unwrapped text from its opening and closing chars or from the
284- * given `opening` and `closing` chars.
279+ * The method returns the primitive value of a specified `Wrapper` object with text unwrapped from its opening and closing chars or given
280+ * `opening` and `closing` chars.
281+ * @param opening Optional opening chars of `string` type to remove from the beginning of the text of the `Wrapper` instance. By default,
282+ * its value is equal to the opening chars of the `Wrapper` instance .
283+ * @param closing Optional closing chars of `string` type to remove from the end of the text of the `Wrapper` instance. By default, its
284+ * value is equal to the closing chars of the `Wrapper` instance .
285+ * @returns The return value is the primitive value of `string` type with text unwrapped from the opening and closing chars of the
286+ * `Wrapper` object or the given `opening` and `closing` chars.
285287 * @angularpackage
286288 */
287- public unwrapText <
288- CustomOpening extends string = Opening ,
289- CustomClosing extends string = Closing
290- > (
291- opening : CustomOpening = this . opening as any ,
292- closing : CustomClosing = this . closing as any
289+ public unwrapText (
290+ opening : string = this . opening ,
291+ closing : string = this . closing
293292 ) : string {
294293 return `${ this . opening } ${ Wrapper . unwrap ( this . text , opening , closing ) } ${
295294 this . closing
296295 } `;
297296 }
298297
299298 /**
300- * The method wraps the primitive value of a specified `Wrapper` object by its opening and closing chars or the given `opening` and
301- * `closing` chars.
302- * @param opening The opening chars of a generic type variable `CustomOpening` to wrap the primitive value of the `Wrapper` instance. By
303- * default, its value is from the opening chars of an instance of `Wrapper`.
304- * @param closing The closing chars of a generic type variable `CustomClosing` to wrap the primitive value of the `Wrapper` instance. By
305- * default, its value is from the closing chars of an instance of `Wrapper`.
306- * @returns The return value is the wrapped primitive value by the given opening and closing chars or the opening and closing chars of the
307- * `Wrapper` instance.
299+ * The method wraps the primitive value of a specified `Wrapper` object by its opening and closing chars or given `opening` and `closing`
300+ * chars.
301+ * @param opening Optional opening chars of a generic type variable `CustomOpening` to wrap the primitive value of the `Wrapper` instance.
302+ * By default, its value is equal to the closing chars of the `Wrapper` instance.
303+ * @param closing Optional closing chars of a generic type variable `CustomClosing` to wrap the primitive value of the `Wrapper` instance.
304+ * By default, its value is equal to the closing chars of the `Wrapper` instance.
305+ * @returns The return value is a primitive value wrapped by the given opening and closing chars or from the `Wrapper` instance.
308306 * @angularpackage
309307 */
310308 public wrap <
@@ -319,13 +317,13 @@ export class Wrapper<
319317
320318 /**
321319 * Wraps given text with the wrap, the opening, and closing chars of the `Wrapper` object.
322- * @param text The text of generic type variable `Txt ` to wrap by the opening and closing chars of the `Wrapper` instance.
323- * @returns The return value is the wrapped text by the opening and closing chars of the `Wrapper` object of the generic type `Wrapped`.
320+ * @param text The text of generic type variable `CustomText ` to wrap by the opening and closing chars of the `Wrapper` instance.
321+ * @returns The return value is the text wrapped by the opening and closing chars of the `Wrapper` object of the generic type `Wrapped`.
324322 * @angularpackage
325323 */
326- public wrapOn < Txt extends string = '' > (
327- text : Txt
328- ) : Wrapped < Opening , Txt , Closing > {
324+ public wrapOn < CustomText extends string = '' > (
325+ text : CustomText
326+ ) : Wrapped < Opening , CustomText , Closing > {
329327 return new Wrap ( this . opening , this . closing , text ) . valueOf ( ) ;
330328 }
331329
0 commit comments