Search Docs
removeAfter
从 input 字符串中移除 target 之后的所有字符。
input
target
import { removeAfter } from 'funtool'; removeAfter('foo-bar', '-') // ✅ 'foo-' removeAfter('hello', 3) // ✅ 'hel'
function removeAfter(input: string, target: string | number): string
string
string | number