Javascript equivalent to C strncmp (compare string for length)

Posted by Daniel Bingham on Stack Overflow See other posts from Stack Overflow or by Daniel Bingham
Published on 2010-01-24T18:22:01Z Indexed on 2010/04/05 15:13 UTC
Read the original article Hit count: 283

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?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about string-processing