Lines Matching refs:fromIndex
232 int String::IndexOf(char c, int fromIndex) const
238 if (fromIndex < 0) {
239 fromIndex = 0;
240 } else if (fromIndex >= GetLength()) {
244 char* p = string_ + fromIndex;
255 int String::IndexOf(const char* string, int fromIndex) const
261 if (fromIndex < 0) {
262 fromIndex = 0;
263 } else if (fromIndex >= GetLength()) {
267 char* c = strstr(string_ + fromIndex, string);
271 int String::IndexOf(const String& other, int fromIndex) const
277 if (fromIndex < 0) {
278 fromIndex = 0;
279 } else if (fromIndex >= GetLength()) {
283 char* c = strstr(string_ + fromIndex, other.string_);
287 int String::LastIndexOf(char c, int fromIndex) const
293 if (fromIndex < 0) {
295 } else if (fromIndex == 0 || fromIndex >= GetLength()) {
296 fromIndex = GetLength() - 1;
298 char* p = string_ + fromIndex;
308 int String::LastIndexOf(const char* string, int fromIndex) const
314 if (fromIndex < 0) {
316 } else if (fromIndex == 0 || fromIndex >= GetLength()) {
317 fromIndex = GetLength() - 1;
320 return LastIndexOfInternal(string, fromIndex);
323 int String::LastIndexOf(const String& other, int fromIndex) const
329 if (fromIndex < 0) {
331 } else if (fromIndex == 0 || fromIndex >= GetLength()) {
332 fromIndex = GetLength() - 1;
335 return LastIndexOfInternal(other.string(), fromIndex);
338 int String::LastIndexOfInternal(const char* string, int fromIndex) const
343 if (fromIndex > rightIndex) {
344 fromIndex = rightIndex;
350 int i = min + fromIndex;