i need to adapt a pascal script into JavaScript. I was able to translate nearly all the code except this two functions.
Pascal codelines:
Result:= AnsiChar(b + ord('0'));
s:= AnsiString(copy(ReNr, 1, length(ReNr) - 1));`
The code in the AnsiChar()-function i already adapt with '0'.codePointAt(0) % 10, and the code in the AnsiString() with ReNr.substr(1, ReNr.length - 1). But i don't understand what the Pascal Ansi-functions does.
Is there a JavaScript pendant to Pascals AnsiChar() and AnsiString() functions or what i have to do, to get the same effect in JavaScript?
I belive it will be something like this:
Delphi's AnsiChar() creates a character from a given ASCII code.
AnsiString converts string to Ansi encoding if it was in multibyte.