Source/NFX/IOMiscUtils.cs
/// <summary>
/// Reads first line from the string
/// </summary>
Reads first line from the string
Reads first line from the string
public static string ReadLine(this string str)
        {
            StringBuilder buf = new StringBuilder();
            for (int i = 0; i < str.Length; i++)
                if ((str[i] == '\n') || (str[i] == '\r'))
                    break;
                else
                    buf.Append(str[i]);
            return buf.ToString();
        }
public static string ReadLine ( this string str ) { StringBuilder buf = new StringBuilder ( ) ; for ( int i = 0 ; i < str . Length ; i ++ ) if ( ( str [ i ] == ' \n ' ) || ( str [ i ] == ' \r ' ) ) break ; else buf . Append ( str [ i ] ) ; return buf . ToString ( ) ; }
Reads first line from the string
Reads first line from the string
string
this