Javascript equivalent to C strncmp (compare string for length)
- by Daniel Bingham
Is there an equivalent in Javascript to the C function strncmp? Strncmp takes two string arguments and an integer length argument. It would compare the two string up to length and determine if they were equal as far as length went.
Does javascript have an equivalent built in function?