[#BloombergLP-bdlb-StringRefUtil]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::StringRefUtil
:relfileprefix: ../../
:mrdocs:

This `struct` provides a namespace for a suite of functions on `bslstl&colon;&colon;StringRef` references to strings&period;

== Synopsis

Declared in `&lt;bdlb&lowbar;stringrefutil&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
struct StringRefUtil;
----

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlb/StringRefUtil/size_type.adoc[`size&lowbar;type`] 
| Size type of string references&period;
|===


== Static Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlb/StringRefUtil/areEqualCaseless.adoc[`areEqualCaseless`] 
| Return `true` if `lhs` and `rhs` compare equal ignoring case&period;
| xref:BloombergLP/bdlb/StringRefUtil/findFirstNotOf.adoc[`findFirstNotOf`] 
| Return the position of the first non&hyphen;matching character in `string`&period;
| xref:BloombergLP/bdlb/StringRefUtil/findFirstOf.adoc[`findFirstOf`] 
| Return the position of the first matching character in `string`&period;
| xref:BloombergLP/bdlb/StringRefUtil/findLastNotOf.adoc[`findLastNotOf`] 
| Return the position of the last non&hyphen;matching character in `string`&period;
| xref:BloombergLP/bdlb/StringRefUtil/findLastOf.adoc[`findLastOf`] 
| Return the position of the last matching character in `string`&period;
| xref:BloombergLP/bdlb/StringRefUtil/lowerCaseCmp.adoc[`lowerCaseCmp`] 
| Compare `lhs` and `rhs` after converting both to lower case&period;
| xref:BloombergLP/bdlb/StringRefUtil/ltrim.adoc[`ltrim`] 
| Return a string reference with leading whitespace removed&period;
| xref:BloombergLP/bdlb/StringRefUtil/rtrim.adoc[`rtrim`] 
| Return a string reference with trailing whitespace removed&period;
| xref:BloombergLP/bdlb/StringRefUtil/strrstr.adoc[`strrstr`] 
| Return a reference to the last occurrence of `subString` in `string`&period;
| xref:BloombergLP/bdlb/StringRefUtil/strrstrCaseless.adoc[`strrstrCaseless`] 
| Return a reference to the last case&hyphen;insensitive occurrence of `subString` in `string`&period;
| xref:BloombergLP/bdlb/StringRefUtil/strstr.adoc[`strstr`] 
| Return a reference to the first occurrence of `subString` in `string`&period;
| xref:BloombergLP/bdlb/StringRefUtil/strstrCaseless.adoc[`strstrCaseless`] 
| Return a reference to the first case&hyphen;insensitive occurrence of `subString` in `string`&period;
| xref:BloombergLP/bdlb/StringRefUtil/substr.adoc[`substr`] 
| Return a substring of `string` starting at `position`&period;
| xref:BloombergLP/bdlb/StringRefUtil/trim.adoc[`trim`] 
| Return a string reference with leading and trailing whitespace removed&period;
| xref:BloombergLP/bdlb/StringRefUtil/upperCaseCmp.adoc[`upperCaseCmp`] 
| Compare `lhs` and `rhs` after converting both to upper case&period;
|===


== Static Data Members

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlb/StringRefUtil/k_NPOS.adoc[`k&lowbar;NPOS`] 
| Value used to denote &quot;not&hyphen;a&hyphen;position&quot;, guaranteed to be outside the `range&lsqb;0 &period;&period; INT&lowbar;MAX&rsqb;`&period;
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
