diff --git a/commons/basic/src/main/ets/utils/ChangeUtil.ets b/commons/basic/src/main/ets/utils/ChangeUtil.ets index b87e1d4..0781c04 100644 --- a/commons/basic/src/main/ets/utils/ChangeUtil.ets +++ b/commons/basic/src/main/ets/utils/ChangeUtil.ets @@ -188,5 +188,13 @@ export class ChangeUtil { const g = parseInt(hex.slice(3, 5), 16); const b = parseInt(hex.slice(5, 7), 16); return `rgba(${r}, ${g}, ${b}, ${alpha})`; - }; + } + + static stringIsUndefinedAndNull (string:string | undefined):boolean { + if (string == undefined || string == "null" || string == "" || string == "(null)" || string == 'undefined' || string.length <= 0) { + return true + } else { + return false + } + } } \ No newline at end of file