Пример #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));
 }