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