aboutsummaryrefslogtreecommitdiff
path: root/src/base/string/equals.c
blob: ba7fd3b787cb53a97fa76b51dd0fd10c1fe611c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include "internal.h"

// Equals returns true if string s and t are equivalent.
bool
string·equals(string s, string t)
{
    vlong sL = string·len(s);
    vlong tL = string·len(t);

    if(sL != tL)
        return false;

    return mem·compare(s, sL, t) == 0;
}