空字符串判断
This commit is contained in:
parent
4df444ed0e
commit
2da6409a0b
@ -188,5 +188,13 @@ export class ChangeUtil {
|
|||||||
const g = parseInt(hex.slice(3, 5), 16);
|
const g = parseInt(hex.slice(3, 5), 16);
|
||||||
const b = parseInt(hex.slice(5, 7), 16);
|
const b = parseInt(hex.slice(5, 7), 16);
|
||||||
return `rgba(${r}, ${g}, ${b}, ${alpha})`;
|
return `rgba(${r}, ${g}, ${b}, ${alpha})`;
|
||||||
};
|
}
|
||||||
|
|
||||||
|
static stringIsUndefinedAndNull (string:string | undefined):boolean {
|
||||||
|
if (string == undefined || string == "null" || string == "<null>" || string == "(null)" || string == 'undefined' || string.length <= 0) {
|
||||||
|
return true
|
||||||
|
} else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user