MCPcopy Create free account
hub / github.com/candybox2/candybox2.github.io / makeUnderlinedLetter

Function makeUnderlinedLetter

code/main/Algo.ts:36–41  ·  view source on GitHub ↗
(s: string, underlinedLetter: number)

Source from the content-addressed store, hash-verified

34
35 // Add the html <u> tag around the specified letter in the string given, and return the resulting string
36 export function makeUnderlinedLetter(s: string, underlinedLetter: number): string{
37 if(underlinedLetter != -1)
38 return s.slice(0, underlinedLetter) + "<u>" + s.charAt(underlinedLetter) + "</u>" + s.slice(underlinedLetter+1, s.length);
39 else
40 return s;
41 }
42
43 // Transform a number in a string and add whitespaces every three figures
44 export function numberToStringButNicely(n: number): string{

Callers

nothing calls this directly

Calls 1

sliceMethod · 0.80

Tested by

no test coverage detected