/// <summary> /// Read a string terminated with a specific character /// </summary> /// <param name="reader">DataReader to read from</param> /// <param name="encoding">The string encoding used</param> /// <param name="terminator">The terminating string</param> /// <param name="required">If true then the terminator must be present, if false will also terminate on EOF</param> /// <exception cref="EndOfStreamException">Throw if hits the end of stream before termination</exception> /// <returns>The read string</returns> public string RTS(DataReader reader, BinaryStringEncoding encoding, string terminator, bool required) { return(ParserUtils.ReadTerminatedString(reader, GeneralUtils.GetEncodingFromType(encoding), terminator, required)); }
/// <summary> /// Read a string terminated with a specific character /// </summary> /// <param name="reader">DataReader to read from</param> /// <param name="encoding">The string encoding used</param> /// <param name="terminator">The terminating character</param> /// <exception cref="EndOfStreamException">Throw if hits the end of stream before termination</exception> /// <returns>The read string</returns> protected string RTS(DataReader reader, BinaryStringEncoding encoding, char terminator) { return(ParserUtils.ReadTerminatedString(reader, GeneralUtils.GetEncodingFromType(encoding), terminator)); }