/// <summary> /// The to upper. /// </summary> /// <param name="value"> /// The value. /// </param> /// <returns> /// The <see cref="byte"/>. /// </returns> public static byte ToUpper(byte value) { if (AsciiChar.IsLower(value)) { return((byte)(value + 32)); } return(value); }
/// <summary> /// Initializes a new instance of the <see cref="AsciiChar"/> struct. /// </summary> /// <param name="asciiCode"> /// The ascii code. /// </param> /// <exception cref="ArgumentOutOfRangeException"> /// </exception> public AsciiChar(byte asciiCode) { if (!AsciiChar.ValidateByte(asciiCode)) { throw new ArgumentOutOfRangeException("asciiCode"); } this.asciiCode = asciiCode; }
/// <summary> /// The is whitespace. /// </summary> /// <returns> /// The <see cref="bool"/>. /// </returns> public bool IsWhitespace() { return(AsciiChar.IsWhitespace(this.asciiCode)); }
/// <summary> /// The is upper. /// </summary> /// <returns> /// The <see cref="bool"/>. /// </returns> public bool IsUpper() { return(AsciiChar.IsUpper(this.asciiCode)); }
/// <summary> /// The is symbol. /// </summary> /// <returns> /// The <see cref="bool"/>. /// </returns> public bool IsSymbol() { return(AsciiChar.IsSymbol(this.asciiCode)); }
/// <summary> /// The is punctuation. /// </summary> /// <returns> /// The <see cref="bool"/>. /// </returns> public bool IsPunctuation() { return(AsciiChar.IsPunctuation(this.asciiCode)); }
/// <summary> /// The is letter or digit. /// </summary> /// <returns> /// The <see cref="bool"/>. /// </returns> public bool IsLetterOrDigit() { return(AsciiChar.IsLetterOrDigit(this.asciiCode)); }
/// <summary> /// The is control. /// </summary> /// <returns> /// The <see cref="bool"/>. /// </returns> public bool IsControl() { return(AsciiChar.IsControl(this.asciiCode)); }
/// <summary> /// The equals. /// </summary> /// <param name="value"> /// The value. /// </param> /// <returns> /// The <see cref="bool"/>. /// </returns> public bool Equals(AsciiChar value) { return(this.asciiCode.Equals(value.asciiCode)); }
/// <summary> /// The compare to. /// </summary> /// <param name="value"> /// The value. /// </param> /// <returns> /// The <see cref="int"/>. /// </returns> public int CompareTo(AsciiChar value) { return(this.asciiCode.CompareTo(value.asciiCode)); }