Add strinclude function

This commit is contained in:
JC Brand 2013-02-28 20:42:08 +02:00
parent d7cb92c7af
commit 10be57aec4

View File

@ -76,6 +76,12 @@
var xmppchat = {};
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) {
if (typeof date.toISOString !== 'undefined') {
return date.toISOString();