MCPcopy Index your code
hub / github.com/ulid/javascript / replaceCharAt

Function replaceCharAt

source/utils.ts:12–17  ·  view source on GitHub ↗
(str: string, index: number, char: string)

Source from the content-addressed store, hash-verified

10}
11
12export function replaceCharAt(str: string, index: number, char: string): string {
13 if (index > str.length - 1) {
14 return str;
15 }
16 return str.substr(0, index) + char + str.substr(index + 1);
17}

Callers 1

incrementBase32Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected