mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Lexer: Migrated isdigit to Lexer::isDigit
This commit is contained in:
parent
c6dbdf87a4
commit
3cbb2bb20f
5 changed files with 85 additions and 81 deletions
10
src/text.cpp
10
src/text.cpp
|
@ -351,7 +351,7 @@ std::string commify (const std::string& data)
|
|||
int i;
|
||||
for (int i = 0; i < (int) data.length (); ++i)
|
||||
{
|
||||
if (isdigit (data[i]))
|
||||
if (Lexer::isDigit (data[i]))
|
||||
end = i;
|
||||
|
||||
if (data[i] == '.')
|
||||
|
@ -369,11 +369,11 @@ std::string commify (const std::string& data)
|
|||
int consecutiveDigits = 0;
|
||||
for (; i >= 0; --i)
|
||||
{
|
||||
if (isdigit (data[i]))
|
||||
if (Lexer::isDigit (data[i]))
|
||||
{
|
||||
result += data[i];
|
||||
|
||||
if (++consecutiveDigits == 3 && i && isdigit (data[i - 1]))
|
||||
if (++consecutiveDigits == 3 && i && Lexer::isDigit (data[i - 1]))
|
||||
{
|
||||
result += ',';
|
||||
consecutiveDigits = 0;
|
||||
|
@ -393,11 +393,11 @@ std::string commify (const std::string& data)
|
|||
int consecutiveDigits = 0;
|
||||
for (; i >= 0; --i)
|
||||
{
|
||||
if (isdigit (data[i]))
|
||||
if (Lexer::isDigit (data[i]))
|
||||
{
|
||||
result += data[i];
|
||||
|
||||
if (++consecutiveDigits == 3 && i && isdigit (data[i - 1]))
|
||||
if (++consecutiveDigits == 3 && i && Lexer::isDigit (data[i - 1]))
|
||||
{
|
||||
result += ',';
|
||||
consecutiveDigits = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue