diff options
Diffstat (limited to 'xfa/fxfa/parser')
-rw-r--r-- | xfa/fxfa/parser/cxfa_widgetdata.cpp | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/xfa/fxfa/parser/cxfa_widgetdata.cpp b/xfa/fxfa/parser/cxfa_widgetdata.cpp index 361c48a6bc..f11a668276 100644 --- a/xfa/fxfa/parser/cxfa_widgetdata.cpp +++ b/xfa/fxfa/parser/cxfa_widgetdata.cpp @@ -51,24 +51,12 @@ bool SplitDateTime(const CFX_WideString& wsDateTime, wsDate = wsDateTime.Left(nSplitIndex); if (!wsDate.IsEmpty()) { - int32_t iCount = wsDate.GetLength(); - int32_t i = 0; - for (i = 0; i < iCount; i++) { - if (wsDate[i] >= '0' && wsDate[i] <= '9') - break; - } - if (i == iCount) + if (!std::any_of(wsDate.begin(), wsDate.end(), std::iswdigit)) return false; } wsTime = wsDateTime.Right(wsDateTime.GetLength() - nSplitIndex - 1); if (!wsTime.IsEmpty()) { - int32_t iCount = wsTime.GetLength(); - int32_t i = 0; - for (i = 0; i < iCount; i++) { - if (wsTime[i] >= '0' && wsTime[i] <= '9') - break; - } - if (i == iCount) + if (!std::any_of(wsTime.begin(), wsTime.end(), std::iswdigit)) return false; } return true; |