Add strinclude function
This commit is contained in:
parent
d7cb92c7af
commit
10be57aec4
@ -76,6 +76,12 @@
|
|||||||
var xmppchat = {};
|
var xmppchat = {};
|
||||||
xmppchat.msg_counter = 0;
|
xmppchat.msg_counter = 0;
|
||||||
|
|
||||||
|
var strinclude = function(str, needle){
|
||||||
|
if (needle === '') { return true; }
|
||||||
|
if (str === null) { return false; }
|
||||||
|
return String(str).indexOf(needle) !== -1;
|
||||||
|
};
|
||||||
|
|
||||||
xmppchat.toISOString = function (date) {
|
xmppchat.toISOString = function (date) {
|
||||||
if (typeof date.toISOString !== 'undefined') {
|
if (typeof date.toISOString !== 'undefined') {
|
||||||
return date.toISOString();
|
return date.toISOString();
|
||||||
|
Loading…
Reference in New Issue
Block a user