PICout::withExternalBufferAnd decomposed to PICout::withExternalBufferAndID and PICout::withExternalBufferAnd

PIString::toPercentageEncoding/fromPercentageEncoding
piStringify()
PIHTTPClient support arguments
some doc
This commit is contained in:
2024-11-26 18:26:02 +03:00
parent 12114b3e77
commit 65d3168eb5
10 changed files with 156 additions and 50 deletions

View File

@@ -1687,6 +1687,10 @@ public:
PIString & setReadableSize(llong bytes);
//! \~english Returns [percentage-encoded](https://en.wikipedia.org/wiki/Percent-encoding) string.
//! \~russian Возвращает [URL-кодированную](https://ru.wikipedia.org/wiki/URL) строку.
PIString toPercentageEncoding() const;
//! \~english Replace all occurances like "%1", "%2", ... with lowest value to "v" and returns this string.
//! \~russian Заменяет все вхождения типа "%1", "%2", ... с наименьшим значением на "v" и возвращает эту строку.
//! \~\details
@@ -1906,6 +1910,10 @@ public:
//! \~\sa PIString::setReadableSize()
static PIString readableSize(llong bytes);
//! \~english Returns string from [percentage-encoded](https://en.wikipedia.org/wiki/Percent-encoding) "in".
//! \~russian Возвращает строку из [URL-кодированной](https://ru.wikipedia.org/wiki/URL)"in".
static PIString fromPercentageEncoding(const PIString & in);
//! \~english Swaps string `str` other with this string.
//! \~russian Меняет строку `str` с этой строкой.
//! \~\details
@@ -2020,4 +2028,15 @@ inline void piSwap(PIString & f, PIString & s) {
f.swap(s);
}
//! \~english Returns string representation of \"v\", using PICout operator<<(T)
//! \~russian Возвращает строковое представление \"v\", используя PICout operator<<(T)
template<typename T>
inline PIString piStringify(const T & v) {
PIString ret;
PICout::withExternalBuffer(&ret) << v;
return ret;
}
#endif // PISTRING_H