[#bsl-basic_string-0faf-find-0a] = xref:bsl.adoc[bsl]::xref:bsl/basic_string-0faf.adoc[basic_string]::find :relfileprefix: ../../ :mrdocs: Find the first occurrence of a character in this string. == Synopsis Declared in `<bslstl_string.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/basic_string-0faf/size_type.adoc[size_type] find( CHAR_TYPE character, xref:bsl/basic_string-0faf/size_type.adoc[size_type] position = 0) const; ---- == Description Return the position of the _first_ occurrence of the specified `character`, if such an occurrence can be found in this string (on or _after_ the optionally specified `position` if such a `position` is specified), and return `npos` otherwise. == Return Value position of the match, or `npos` if not found == Parameters [cols="1,4"] |=== | Name| Description | *character* | character to search for | *position* | index at which to start the search |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#