- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
String.prototype.startsWith=function(b){
if(this.length<b.length){
return false
}
for(var a=0;a<b.length;++a){
if(this.charAt(a)!==b.charAt(a)){
return false
}
}
return true
};
String.prototype.endsWith=function(b){
if(this.length<b.length){
return false
}
var c=b.length-1;
for(var a=this.length-1;a>this.length-1-b.length;--a){
if(b.charAt(c--)!==this.charAt(a)){
return false
}
}
return true
};
String.prototype.contains=function(a){
return this.indexOf(a)!==-1
};
String.prototype.LastIndexOf=function(d,c){
if(this.length===0||d===null){
return -1
}
if(d.length>this.length){
return -1
}
if(isNaN(c)){
c=this.length-d.length
}
var a=false;
for(var b=c;b>=0;--b){
a=true;
for(var e=0;e<d.length;++e){
if(this.charAt(b+e)!==d.charAt(e)){
a=false;
break
}
}
if(a){
return b
}
}
return -1
};
String.prototype.LastIndexOf_char=function(a){
for(var b=this.length-1;b>=0;--b){
if(this.charAt(b)===a){
return b
}
}
return -1
};
String.prototype.setCharAt=function(b,a){
if(b>this.length-1){
return str
}
return this.substr(0,b)+a+this.substr(b+1)
};
String.prototype.countCharAppearances=function(a){
var b=0;
for(var c=0;c<this.length;++c){
if(this.charAt(c)==a){
++b
}
}
return b
};