NSString(NSString_CheckNumber)

@interface NSString (NSString_CheckNumber)

Category to check if the string is numeric

  • Category to check if the string is numeric, i.e. [0-9]

    Declaration

    Objective-C

    - (BOOL)isNumber;

    Swift

    func isNumber() -> Bool

    Return Value

    true if it is numeric, false otherwise