Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
3fb56b38
Kaydet (Commit)
3fb56b38
authored
Haz 23, 2015
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Simplify comphelper::string::isdigitAsciiString definitions
Change-Id: I26c889e51287a239ef92a798a6899266837064d9
üst
a9833ee9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
18 deletions
+7
-18
string.cxx
comphelper/source/misc/string.cxx
+7
-18
No files found.
comphelper/source/misc/string.cxx
Dosyayı görüntüle @
3fb56b38
...
...
@@ -24,6 +24,7 @@
#include <vector>
#include <algorithm>
#include <rtl/character.hxx>
#include <rtl/ustring.hxx>
#include <rtl/ustrbuf.hxx>
#include <rtl/string.hxx>
...
...
@@ -342,30 +343,18 @@ NaturalStringSorter::NaturalStringSorter(
m_xBI
=
i18n
::
BreakIterator
::
create
(
rContext
);
}
namespace
{
//do OPER on each element of the string, return false
//if any OPER is false, true otherwise
template
<
bool
(
*
OPER
)(
sal_Unicode
),
typename
T
>
bool
tmpl_is_OPER_AsciiString
(
const
T
&
rString
)
{
for
(
sal_Int32
i
=
0
;
i
<
rString
.
getLength
();
++
i
)
{
if
(
!
OPER
(
rString
[
i
]))
return
false
;
}
return
true
;
}
}
bool
isdigitAsciiString
(
const
OString
&
rString
)
{
return
tmpl_is_OPER_AsciiString
<
isdigitAscii
>
(
rString
);
return
std
::
all_of
(
rString
.
getStr
(),
rString
.
getStr
()
+
rString
.
getLength
(),
[](
unsigned
char
c
){
return
rtl
::
isAsciiDigit
(
c
);
});
}
bool
isdigitAsciiString
(
const
OUString
&
rString
)
{
return
tmpl_is_OPER_AsciiString
<
isdigitAscii
>
(
rString
);
return
std
::
all_of
(
rString
.
getStr
(),
rString
.
getStr
()
+
rString
.
getLength
(),
rtl
::
isAsciiDigit
);
}
namespace
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment