--------------------------------------------------------------------------- @function: CWStringBase::Find @doc: Returns the index of the first occurrence of a character, -1 if not found ---------------------------------------------------------------------------
| 132 | // |
| 133 | //--------------------------------------------------------------------------- |
| 134 | INT |
| 135 | CWStringBase::Find(WCHAR wc) const |
| 136 | { |
| 137 | const WCHAR *w_str = GetBuffer(); |
| 138 | const ULONG length = Length(); |
| 139 | |
| 140 | for (ULONG i = 0; i < length; i++) |
| 141 | { |
| 142 | if (wc == w_str[i]) |
| 143 | { |
| 144 | return i; |
| 145 | } |
| 146 | } |
| 147 | |
| 148 | return -1; |
| 149 | } |
| 150 | |
| 151 | |
| 152 | //--------------------------------------------------------------------------- |
no outgoing calls