AGS.CScript.Compiler.FastString.IndexOf C# (CSharp) Method

IndexOf() public method

public IndexOf ( char text ) : int
text char
return int
        public int IndexOf(char text)
        {
            return _data.IndexOf(text, _offset) - _offset;
        }

Same methods

FastString::IndexOf ( char text, int offset ) : int
FastString::IndexOf ( string text ) : int
FastString::IndexOf ( string text, int offset ) : int

Usage Example

Example #1
0
 private static bool IncrementIndexToSkipAnyComments(FastString script, ref int index)
 {
     if (index < script.Length - 1)
     {
         if ((script[index] == '/') && (script[index + 1] == '/'))
         {
             while ((script[index] != '\r') && (index < script.Length - 1))
             {
                 index++;
             }
         }
         if ((script[index] == '/') && (script[index + 1] == '*'))
         {
             index = script.IndexOf("*/", index + 2);
             if (index < 0)
             {
                 index = script.Length - 1;
                 return true;
             }
         }
     }
     return false;
 }
All Usage Examples Of AGS.CScript.Compiler.FastString::IndexOf