5.24
This commit is contained in:
@ -307,8 +307,11 @@ export const numberToChinese = (num: any) => {
|
||||
* @param str
|
||||
* @returns
|
||||
*/
|
||||
export const trim = (str: string | undefined) => {
|
||||
let _str = str?.replace(/(^\s*)|(\s*$)/g, "");
|
||||
_str = _str?.replace(/[<>|\\/??::*""“”\s\r\n\t]/, "");
|
||||
return _str;
|
||||
export const trim = (str: string): string => {
|
||||
if (isNotEmpty(str)) {
|
||||
let _str = str.replace(/(^\s*)|(\s*$)/g, "");
|
||||
_str = _str.replace(/[<>|\\/??::*""“”\s\r\n\t]/, "");
|
||||
return _str;
|
||||
}
|
||||
return '';
|
||||
}
|
Reference in New Issue
Block a user