コード例 #1
0
        public static async Tasks.Task <string> ReadLine(this ITextReader me)
        {
            string result;

            if (me.IsNull() || await me.Empty)
            {
                result = null;
            }
            else
            {
                result = await me.ReadUpTo('\n');

                me.Read('\n').Forget();
            }
            return(result);
        }
コード例 #2
0
 public static Tasks.Task <string> ReadUpTo(this ITextReader me, params char[] characters)
 {
     return(me.ReadUpTo(last => characters.Contains(last)));
 }
コード例 #3
0
 public static Tasks.Task <string> ReadUpTo(this ITextReader me, char character)
 {
     return(me.ReadUpTo(last => last == character));
 }