How to test if a given string contains a valid number?
Answer / Ashish Singh
To test if a given string contains a valid number in Delphi, you can use the TryStrToType function. Here's an example:
```delphi
function IsValidNumber(const S: String): Boolean;
begin
Result := TryStrToType<Double>(S, 0);
end;
```
| Is This Answer Correct ? | 0 Yes | 0 No |
Why is there no automation in releasing the memory automatically during the termination of the program?
How to Determine if Delphi Running?
How to Change the main form of an application at runtime ?
How to Get current record from a TDBGrid ?
How to Add a document to the Windows 95 Start Button's documents ?
What technical support do we get with Delphi?
what are Hetergenious joins ?
How to convert numbers into roman numerals?
How to Copy contents of a control to the clipboard?
How to Create resource files?
How to run executables created in Kylix?
How to get the date of the last day in the current month?