sync
This commit is contained in:
@ -10,16 +10,16 @@ export function contains(s, key, ignoreCase) {
|
||||
key = String(key);
|
||||
}
|
||||
if (ignoreCase) {
|
||||
return s.toLowerCase().indexOf(key.toLowerCase()) >= 0;
|
||||
return s.toLowerCase().includes(key.toLowerCase());
|
||||
}
|
||||
return s.indexOf(key) >= 0;
|
||||
return s.includes(key);
|
||||
}
|
||||
|
||||
export function endsWith(s, suffix) {
|
||||
if (nullOrEmpty(s) || nullOrEmpty(suffix)) {
|
||||
return false;
|
||||
}
|
||||
return s.indexOf(suffix) === s.length - suffix.length;
|
||||
return s.endsWith(suffix); // === s.length - suffix.length;
|
||||
}
|
||||
|
||||
export function padStart(s, num, char) {
|
||||
|
Reference in New Issue
Block a user