JCL Help:StrConsistsOfNumberChars@AnsiString

From Project JEDI Wiki
Jump to navigationJump to search


Summary

Tests whether S contains only numerical characters.


Pascal

 function StrConsistsOfNumberChars(const S: string): Boolean;
function StrConsistsOfNumberChars(const S: AnsiString): Boolean;


Parameters

Parameters Description
const S: string The string to test


Return Value

If S contains only numerical characters the result is True, otherwise the result is False.


Description

StrConsistsOfNumberChars tests whether the supplied string consists only of numerical characters. That is, whether or not all individual characters come from the ['0'..'9'] set including the decimal separator. To test for numerical characters without the decimal separator, use StrIsDigit instead;


See Also

StrIsAlpha StrIsAlphaNum StrIsDigit


About

Unit

JclAnsiStrings


Donator

Nick Hodges


Notes

If S is an empty string the result is False.


Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page