This commit is contained in:
唐明明
2021-09-23 17:03:28 +08:00
parent d4bd0ac010
commit 08c56ea921
245 changed files with 40734 additions and 80 deletions

15
node_modules/uview-ui/libs/function/trim.js generated vendored Normal file
View File

@@ -0,0 +1,15 @@
function trim(str, pos = 'both') {
if (pos == 'both') {
return str.replace(/^\s+|\s+$/g, "");
} else if (pos == "left") {
return str.replace(/^\s*/, '');
} else if (pos == 'right') {
return str.replace(/(\s*$)/g, "");
} else if (pos == 'all') {
return str.replace(/\s+/g, "");
} else {
return str;
}
}
export default trim