4 ms·
It's probably an unfortunate decision either way: For interacting with things the user types the ordinal approach is wrong, but for low-level handling of text t
by ygra 5y ago
It's probably an unfortunate decision either way: For interacting with things the user types the ordinal approach is wrong, but for low-level handling of text the ordinal approach is faster. In both cases you basically have to know your exact needs and choose the correct variant. You could have the parameter not being optional and thus force every user of that API to make that decision, but that is probably fairly quickly perceived as annoying.
- AtNightWeCode 5y agoOrdinal is the default comparison for most .NET string methods. Most linters will force you to make an active choice. And it is not only a performance thing since you open up for all these Unicode attacks.