Namespace: Rx – Class: CRxString – Header: Rx.Core/RxString.h

CRxString::Find Method

C++
size_t Find(const char* string, size_t startIdx, bool ignoreCase, bool completeWord)

Searches this string for the content specified in string, and returns the position of the first occurrence in this string.

When startIdx is specified the search only includes characters on or after position startIdx, ignoring any possible occurrences in previous locations.

Parameters

[const char*] string

String to be searched for in this string. The entire content of string must be matched in some part of the string to be considered a match.

[size_t] startIdx

(optional) Position of the first character in the string to be taken into consideration for possible matches. A value of 0 means that the entire string is considered.

[bool] ignoreCase

(Optional) True to ignore the case.

[bool] completeWord

(Optional) True to find only complete words.

Returns

size_t

The position of the first occurrence of the searched content. If the content is not found, CRxString::npos is returned.