Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
use String;
use ByteBufferHelpers;
inline proc doComp(a: ?t1, b: ?t2, c:int, d:int) {
return _strcmp(a.buff+c-1, d-c+1, a.locale_id, b.buff, b.len, b.locale_id) == 0;
}
var i : string = "asdfasdf5";
var j : string = "asdf";
if doComp(i, j, 1, 5)
{writeln(true);}
else
{writeln(false);}
if doComp(i, j, 1, 4)
{writeln(true);}
else
{writeln(false);}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment