All Downloads are FREE. Search and download functionalities are using the official Maven repository.

static.scripts.common.js Maven / Gradle / Ivy

There is a newer version: 0.41.3
Show newest version
function autoLineFeed(strValue, strLen) {
    if (null == strValue || "" == strValue) {
        return "";
    }
    var strLength = null == strLen || isNaN(parseInt(strLen)) ? 50 : strLen;
    var content = "";
    for (var i = 0; ;) {
        for (var j = 0; j < strLength;) {
            if (strValue.charAt(i) >= 0 && strValue.charAt(i) <= 255) {
                j++;
            } else{
                j+=2;
            }
            content += strValue.substr(i++, 1);
            if (i >= strValue.length) {
                return content;
            }
        }
        content += "\n";
    }
    return content;
}

function isBlank(value) {
    return null == value || undefined == value || (value + "").replace(/\s/gm, "").length == 0;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy