How to use TCharHelper?

The following code:

function get_symbol (var s: String): String; var c: Char; p: Int32; begin // ... some more code ... c := upcase (s [p]); if IsDigit (c) then 

causes the following error message:

[dcc32 Warning] fmx_utilities_string.pas(188): W1000 Symbol 'IsDigit' is deprecated: 'Use TCharHelper'

I do not understand this message because System.Character is included, c is declared as Char, and TCharhelper is declared as an auxiliary character of the Char character. What am I doing wrong?

+5
source share
1 answer

You are not using TCharHelper ; instead, you use the old System.Character IsDigit function. Way to use TCharHelper.IsDigit :

 if c.IsDigit then ... 
+7
source

Source: https://habr.com/ru/post/1210558/


All Articles