Skip to content

cmp function is borken in javascript #7603

@treeform

Description

@treeform

so in js this is wrong:

cmp("foo", "foo") = 0
cmp("foo_bar", "foo") = 95
cmp("foo", "foo_bar") = 0

It does not check when you go over the length of the string if the first string is smaller.

proc cmpStrings(a, b: string): int {.asmNoStackFrame, compilerProc.} =

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions