CMac
com.mhuss.Util

Class CMac



  • public class CMacextends Object
    This is a set of handy utility functions (from 'C' land).
    Note: For simplicity, these assume the 'C' locale and ASCII charset
    • Constructor Summary

      Constructors 
      Constructor and Description
      CMac() 
    • Method Summary

      Methods 
      Modifier and TypeMethod and Description
      static booleanisalnum(char c)
      Returns true if the char isalpha() or isdigit().
      static booleanisalpha(char c)
      Returns true if the char isupper() or islower().
      static booleanisascii(char c)
      Returns true if the int value of the char is from 0 to 127 inclusive.
      static booleanisdigit(char c)
      Returns true if the char is from '0' to '9' inclusive.
      static booleanislower(char c)
      Returns true if the char is from 'a' to 'z' inclusive.
      static booleanisspace(char c)
      Returns true if the char is in the set SP, HT, LF, VT, FF, CR.
      static booleanisupper(char c)
      Returns true if the char is from 'A' to 'Z' inclusive.
      static booleanisxdigit(char c)
      Returns true if the char isdigit() or is from 'A' to 'F' or 'a' to 'f' inclusive.
      static chartolower(char c)
      Returns lowercase of input char if input is from 'A' to 'Z', else returns input char unchanged.
      static chartoupper(char c)
      Returns uppercase of input char if input is from 'a' to 'z', else returns input char unchanged.
    • Constructor Detail

      • CMac

        public CMac()
    • Method Detail

      • isalpha

        public static boolean isalpha(char c)
        Returns true if the char isupper() or islower().
      • isupper

        public static boolean isupper(char c)
        Returns true if the char is from 'A' to 'Z' inclusive.
      • islower

        public static boolean islower(char c)
        Returns true if the char is from 'a' to 'z' inclusive.
      • isdigit

        public static boolean isdigit(char c)
        Returns true if the char is from '0' to '9' inclusive.
      • isxdigit

        public static boolean isxdigit(char c)
        Returns true if the char isdigit() or is from 'A' to 'F' or 'a' to 'f' inclusive.
      • isalnum

        public static boolean isalnum(char c)
        Returns true if the char isalpha() or isdigit().
      • isspace

        public static boolean isspace(char c)
        Returns true if the char is in the set SP, HT, LF, VT, FF, CR.
      • isascii

        public static boolean isascii(char c)
        Returns true if the int value of the char is from 0 to 127 inclusive.
      • toupper

        public static char toupper(char c)
        Returns uppercase of input char if input is from 'a' to 'z', else returns input char unchanged.
      • tolower

        public static char tolower(char c)
        Returns lowercase of input char if input is from 'A' to 'Z', else returns input char unchanged.

SCaVis 2.2 © jWork.ORG