strlen_s, where for art thou?

I just received an email from a product group wanting to replace a small number of calls to strlen with strlen_s to help them be SDL compliant. Problem is, there is no strlen_s! :(

So I had a chat with Martyn Lovell, who headed the SafeCRT work to find out where the function has disappeared to. It turns out it's there alright, but the ISO folks didn't like the naming, the correct name is strnlen_s, which maps to strnlen:

static

__inline __checkReturn size_t __CRTDECL strnlen_s(__in_ecount_z(_MaxCount) const char * _Str, __in size_t _MaxCount)
{
return strnlen(_Str, _MaxCount);
}