strlen, strnlen_s - cppreference.com
Jun 13, 2024 · strnlen_s and wcsnlen_s are the only bounds-checked functions that do not invoke the runtime constraints handler. They are pure utility functions used to provide limited support for non-null terminated strings.