Beispiel #1
0
 /// <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);
 }
Beispiel #2
0
        /// <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;
        }
Beispiel #3
0
 /// <summary>
 /// The is whitespace.
 /// </summary>
 /// <returns>
 /// The <see cref="bool"/>.
 /// </returns>
 public bool IsWhitespace()
 {
     return(AsciiChar.IsWhitespace(this.asciiCode));
 }
Beispiel #4
0
 /// <summary>
 /// The is upper.
 /// </summary>
 /// <returns>
 /// The <see cref="bool"/>.
 /// </returns>
 public bool IsUpper()
 {
     return(AsciiChar.IsUpper(this.asciiCode));
 }
Beispiel #5
0
 /// <summary>
 /// The is symbol.
 /// </summary>
 /// <returns>
 /// The <see cref="bool"/>.
 /// </returns>
 public bool IsSymbol()
 {
     return(AsciiChar.IsSymbol(this.asciiCode));
 }
Beispiel #6
0
 /// <summary>
 /// The is punctuation.
 /// </summary>
 /// <returns>
 /// The <see cref="bool"/>.
 /// </returns>
 public bool IsPunctuation()
 {
     return(AsciiChar.IsPunctuation(this.asciiCode));
 }
Beispiel #7
0
 /// <summary>
 /// The is letter or digit.
 /// </summary>
 /// <returns>
 /// The <see cref="bool"/>.
 /// </returns>
 public bool IsLetterOrDigit()
 {
     return(AsciiChar.IsLetterOrDigit(this.asciiCode));
 }
Beispiel #8
0
 /// <summary>
 /// The is control.
 /// </summary>
 /// <returns>
 /// The <see cref="bool"/>.
 /// </returns>
 public bool IsControl()
 {
     return(AsciiChar.IsControl(this.asciiCode));
 }
Beispiel #9
0
 /// <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));
 }
Beispiel #10
0
 /// <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));
 }