TypeScript Compare prefix Online
Compare text prefix using a target value and length.
Run details
The output updates as you type. The tool processes input in your browser.
Worked example
Compare the first N units of each value. Negative, zero, and positive results indicate ordering.
- Prefix
"manual"- Length
6
manuals
0
Using this operation in TypeScript
The interactive result uses JavaScript. TypeScript string values use JavaScript runtime semantics. The TypeScript library configuration controls whether the compiler recognizes newer APIs.