[#BloombergLP-bdlb-String-strnlen] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::xref:BloombergLP/bdlb/String.adoc[String]::strnlen :relfileprefix: ../../../ :mrdocs: Return the minimum of the length of the specified `string` and the specified `maximumLength`. If `maximumLength` is 0, `string` may be null and 0 is returned. The behavior is undefined unless `0 <= maximumLength`. == Synopsis Declared in `<bdlb_string.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int strnlen( char const* string, int maximumLength); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#