MCPcopy Index your code
hub / github.com/DeepNotesApp/DeepNotes / splitStr

Function splitStr

packages/@stdlib/misc/src/string.ts:1–11  ·  view source on GitHub ↗
(str: string, separator: string, limit?: number)

Source from the content-addressed store, hash-verified

1export function splitStr(str: string, separator: string, limit?: number) {
2 const parts = str.split(separator);
3
4 if (limit != null && parts.length > limit) {
5 const rest = parts.splice(limit - 1);
6
7 parts.push(rest.join(separator));
8 }
9
10 return parts;
11}
12
13const textEncoder = new TextEncoder();
14export function textToBytes(text: string): Uint8Array {

Callers 15

constructorMethod · 0.90
patchMethod · 0.90
deleteMethod · 0.90
encrypted-name.tsFile · 0.90
index.tsFile · 0.90
role.tsFile · 0.90
exists.tsFile · 0.90
index.tsFile · 0.90
last-parent-id.tsFile · 0.90
encrypted-name.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected