company logo

String :: isNumber - Does string contain numerical value

The function checks, whether a string contains a numerical value (dual, octal, decimal or hexadecimal). The value may contain a decimal point. Float point values are not recognized as numbers.

When the string content is numerical, the function returns true , false otherwise.

Return value:  Success ( bool  )

The value is true when the function was executed successfully. Otherwise the value is set to false .

Implementation overview

Implementation details

  1. Check whether string contains decimal number
    bool String  :: isNumber (  )

    Decimal numbers are those, which contain digits, only. Decimal numbers may contain also a decimal point and/or thousands separators.

  2. to list
  3. Is number for specific numbering system
    bool String  :: isNumber ( int32 iValue )

    The base for the numbering system (radix) is passed in iValue. In principle, any value between 2 and 32 is supported, but typically, dual (2), octal (8), decimal (10) or hexadecimal (16) values are used. Numbers may contain one decimal point and/or thousands separators. Any other character will lead to false result, i.e. negative values (as -5) are also not recognized as numbers.

    • iValue - Integer value

      The value is passed as platform independent 32-bit integer value.

  4. to list