Would your medical application fail FDA approval if you used a language like C or C++ that contained strncmp? Because that function throws away data, too.
There's a difference between strncmp existing precisely so you can specify how many characters to compare, vs. throwing away trailing characters in a string just because, by sheer chance, it contains only numerics.