Class StringReplaceEnhanced
Constructors
constructor
-
Parameters
-
Default value options: object = {}
Methods
replace
- replace(str: string, toReplace?: ReadonlyArray<string> | string, replacer?: string): string
-
Parameters
-
str: string
-
Default value toReplace: ReadonlyArray<string> | string = this.settings.toReplace
-
Default value replacer: string = this.settings.replacer
Returns string
replaceAfter
- replaceAfter(str: string, toReplace?: string, replacer?: string, after?: ReadonlyArray<string> | string): string
-
Parameters
-
str: string
-
Default value toReplace: string = this.settings.toReplace
-
Default value replacer: string = this.settings.replacer
-
Default value after: ReadonlyArray<string> | string = this.settings.after
Returns string
replaceAround
- replaceAround(str: string, toReplace?: string, replacer?: string, around?: ReadonlyArray<string> | string): string
-
Parameters
-
str: string
-
Default value toReplace: string = this.settings.toReplace
-
Default value replacer: string = this.settings.replacer
-
Default value around: ReadonlyArray<string> | string = this.settings.around
Returns string
replaceBefore
- replaceBefore(str: string, toReplace?: string, replacer?: string, before?: ReadonlyArray<string> | string): string
-
Parameters
-
str: string
-
Default value toReplace: string = this.settings.toReplace
-
Default value replacer: string = this.settings.replacer
-
Default value before: ReadonlyArray<string> | string = this.settings.before
Returns string
replaceOnRegex
- replaceOnRegex(str: string, regex?: ReadonlyArray<RegExp> | RegExp, replacer?: string): string
-
Parameters
-
str: string
-
Default value regex: ReadonlyArray<RegExp> | RegExp = this.settings.regex
-
Default value replacer: string = this.settings.replacer
Returns string
Management module for non-breaking spaces
StringReplaceEnhanced