summaryrefslogtreecommitdiff
path: root/shared/string_tools.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:14:37 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:14:37 +0200
commit8bf668665b107469086f16cb8ad23e47d479d2b4 (patch)
tree66a91ef06a8caa7cd6819dcbe1860693d3eda8d5 /shared/string_tools.h
parent3.21 (diff)
downloadFreeFileSync-8bf668665b107469086f16cb8ad23e47d479d2b4.tar.gz
FreeFileSync-8bf668665b107469086f16cb8ad23e47d479d2b4.tar.bz2
FreeFileSync-8bf668665b107469086f16cb8ad23e47d479d2b4.zip
4.0
Diffstat (limited to 'shared/string_tools.h')
-rw-r--r--shared/string_tools.h16
1 files changed, 7 insertions, 9 deletions
diff --git a/shared/string_tools.h b/shared/string_tools.h
index d2e2c597..8951d942 100644
--- a/shared/string_tools.h
+++ b/shared/string_tools.h
@@ -311,8 +311,7 @@ bool endsWith(const S& str, const T& postfix)
}
-// get all characters after the last occurence of ch
-// (returns the whole string if ch not found)
+//returns the whole string if ch not found
template <class S, class T> inline
S afterLast(const S& str, const T& ch)
{
@@ -329,8 +328,7 @@ S afterLast(const S& str, const T& ch)
}
-// get all characters before the last occurence of ch
-// (returns empty string if ch not found)
+//returns empty string if ch not found
template <class S, class T> inline
S beforeLast(const S& str, const T& ch)
{
@@ -515,7 +513,7 @@ private:
{
wchar_t buffer[50];
#ifdef __MINGW32__
- int charsWritten = ::swprintf(buffer, L"%f", static_cast<double>(number)); //MinGW does not comply to the C standard!
+ int charsWritten = ::swprintf(buffer, L"%f", static_cast<double>(number)); //MinGW does not comply to the C standard here
#else
int charsWritten = std::swprintf(buffer, 50, L"%f", static_cast<double>(number));
#endif
@@ -662,12 +660,12 @@ inline
S toString(const Num& number) //convert number to string the C++ way
{
using namespace implementation;
- return CvrtNumberToString<S, Num,
+ return CvrtNumberToString < S, Num,
Loki::TypeTraits<Num>::isSignedInt ? NUM_TYPE_SIGNED_INT :
Loki::TypeTraits<Num>::isUnsignedInt ? NUM_TYPE_UNSIGNED_INT :
Loki::TypeTraits<Num>::isFloat ? NUM_TYPE_FLOATING_POINT :
NUM_TYPE_OTHER
- >().convert(number);
+ > ().convert(number);
}
@@ -676,12 +674,12 @@ inline
Num toNumber(const S& str) //convert string to number the C++ way
{
using namespace implementation;
- return CvrtStringToNumber<S, Num,
+ return CvrtStringToNumber < S, Num,
Loki::TypeTraits<Num>::isSignedInt ? NUM_TYPE_SIGNED_INT :
Loki::TypeTraits<Num>::isUnsignedInt ? NUM_TYPE_UNSIGNED_INT :
Loki::TypeTraits<Num>::isFloat ? NUM_TYPE_FLOATING_POINT :
NUM_TYPE_OTHER
- >().convert(str);
+ > ().convert(str);
}
}
bgstack15