File tree 1 file changed +6
-11
lines changed
1 file changed +6
-11
lines changed Original file line number Diff line number Diff line change 22
22
*/
23
23
24
24
25
-
26
25
function RegexMatch ( word : string , regex : RegExp ) : boolean {
27
26
const words = word . trim ( ) ;
28
27
const barisdata : string [ ] = [ ] ;
@@ -171,16 +170,6 @@ class FilterBadWord {
171
170
172
171
if ( check . length > 0 ) {
173
172
const word = this . _text . toLowerCase ( ) ;
174
- function before_str ( number , key ) {
175
-
176
- return word . substring ( number , word . indexOf ( key ) ) ; //nomer dan keyword
177
-
178
- } ;
179
-
180
- function after_str ( w , spec ) {
181
- let data = word . substring ( word . indexOf ( w ) , spec . length + word . length ) ;
182
- return data . replace ( w , "" ) . trim ( ) ; //, word.indexOf(spec));
183
- } ;
184
173
185
174
for ( const index of check ) {
186
175
const word_s = this . getBoundPosition ( this . _text . toLowerCase ( ) , index ) ;
@@ -250,6 +239,12 @@ class FilterBadWord {
250
239
class filters_badword extends FilterBadWord {
251
240
protected _cl : boolean ;
252
241
protected _st : boolean ;
242
+
243
+ constructor ( ) {
244
+ super ( ) ; // Memanggil konstruktor kelas induk
245
+ this . _cl = true ; // Inisialisasi properti cl
246
+ this . _st = true ; // Inisialisasi properti st
247
+ }
253
248
254
249
public text_o ( text : string ) : void {
255
250
this . _text = text . toString ( ) ;
You can’t perform that action at this time.
0 commit comments