File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 1+ import trimCharactersEnd from "./trim_characters_end.ts" ;
2+ import trimCharactersStart from "./trim_characters_start.ts" ;
3+
4+ /**
5+ * This function is similar to the standard `String.prototype.trim()` function. With this function, several characters
6+ * can be specified as a string which are then trimmed at the start and end of the `inputString`.
7+ *
8+ * @param inputString The input string to trim the start and end
9+ * @param characters The characters to trim
10+ * @returns The trimmed input string
11+ */
112export default function trimCharacters (
213 inputString : string ,
314 characters : string
415) : string {
5- const charactersArray = characters . split ( '' ) ;
6-
16+ return trimCharactersStart ( trimCharactersEnd ( inputString , characters ) , characters )
717}
You can’t perform that action at this time.
0 commit comments