UNPKG

@tuniao/tnui-vue3-uniapp

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