Answers for "is string undefined null or empty c# javascript"

0

is string undefined null or empty c# javascript

/**
  * Checks the string if undefined, null, not typeof string, empty or space(s)
  * @param {any} str string to be evaluated
  * @returns {boolean} the evaluated result
*/
function isStringNullOrWhiteSpace(str) {
    return str === undefined || str === null
                             || typeof str !== 'string'
                             || str.match(/^ *$/) !== null;
}
Posted by: Guest on September-30-2021

Code answers related to "is string undefined null or empty c# javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language