EASYAIuniappNewUI/node_modules/@tuniao/tnui-vue3-uniapp/libs/lodash/_baseTrim.ts
2025-02-08 18:50:38 +08:00

10 lines
232 B
TypeScript

import { trimmedEndIndex } from './_trimmedEndIndex'
const reTrimStart = /^\s+/
export function baseTrim(string: string) {
return string
? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
: string
}