23#include <rtl/ustrbuf.hxx>
33 return lhs.
getString().toAsciiUpperCase();
41 return lhs.
getString().toAsciiLowerCase();
49 sal_Int32 nAscii = sStr.toChar();
66 OUStringBuffer sRet(
static_cast<sal_Int32
>(lhs.size()));
67 std::vector<ORowSetValue>::const_reverse_iterator aIter = lhs.rbegin();
68 std::vector<ORowSetValue>::const_reverse_iterator aEnd = lhs.rend();
69 for (; aIter != aEnd; ++aIter)
73 char c =
static_cast<char>(aIter->getInt32());
75 sRet.appendAscii(&c, 1);
79 return sRet.makeStringAndClear();
88 std::vector<ORowSetValue>::const_reverse_iterator aIter = lhs.rbegin();
89 std::vector<ORowSetValue>::const_reverse_iterator aEnd = lhs.rend();
90 for (; aIter != aEnd; ++aIter)
95 sRet.append(aIter->getString());
98 return sRet.makeStringAndClear();
103 if (std::any_of(lhs.begin(), lhs.end(),
104 [](
const ORowSetValue& rValue) { return rValue.isNull(); }))
108 return OUString(OUString::number(lhs[0].
getString().indexOf(lhs[1].
getString()) + 1));
110 else if (lhs.size() != 3)
113 return lhs[1].getString().indexOf(lhs[2].
getString(), lhs[0].getInt32()) + 1;
118 if (std::any_of(lhs.begin(), lhs.end(),
119 [](
const ORowSetValue& rValue) { return rValue.isNull(); }))
122 if (lhs.size() == 2 && lhs[0].getInt32() >= sal_Int32(0))
123 return lhs[1].getString().copy(lhs[0].getInt32() - 1);
125 else if (lhs.size() != 3 || lhs[1].getInt32() < sal_Int32(0))
128 return lhs[2].getString().copy(lhs[1].getInt32() - 1, lhs[0].getInt32());
137 OUString sNew = sRet.trim();
138 return sRet.copy(sRet.indexOf(sNew));
147 OUString sNew = sRet.trim();
148 return sRet.copy(0, sRet.lastIndexOf(sNew[sNew.getLength() - 1]) + 1);
157 OUStringBuffer sRet(
nCount);
159 return sRet.makeStringAndClear();
167 OUString sStr = lhs[2].getString();
168 OUString sFrom = lhs[1].getString();
169 OUString sTo = lhs[0].getString();
170 return sStr.replaceAll(sFrom, sTo);
180 OUStringBuffer sRet(s.getLength() *
nCount);
185 return sRet.makeStringAndClear();
193 OUString sStr = lhs[3].getString();
195 sal_Int32 nStart = lhs[2].getInt32();
198 return sStr.replaceAt(nStart - 1, lhs[1].getInt32(), lhs[0].
getString());
210 return sRet.copy(0,
nCount);
220 if (nCount < 0 || nCount >= sRet.getLength())
sal_Int32 getInt32() const
OUString getString() const
virtual ORowSetValue operate(const ORowSetValue &lhs) const override
virtual ORowSetValue operate(const ORowSetValue &lhs) const override
virtual ORowSetValue operate(const std::vector< ORowSetValue > &lhs) const override
virtual ORowSetValue operate(const std::vector< ORowSetValue > &lhs) const override
virtual ORowSetValue operate(const std::vector< ORowSetValue > &lhs) const override
virtual ORowSetValue operate(const ORowSetValue &lhs) const override
virtual ORowSetValue operate(const ORowSetValue &lhs, const ORowSetValue &rhs) const override
virtual ORowSetValue operate(const std::vector< ORowSetValue > &lhs) const override
virtual ORowSetValue operate(const ORowSetValue &lhs) const override
virtual ORowSetValue operate(const ORowSetValue &lhs) const override
virtual ORowSetValue operate(const ORowSetValue &lhs, const ORowSetValue &rhs) const override
virtual ORowSetValue operate(const std::vector< ORowSetValue > &lhs) const override
virtual ORowSetValue operate(const ORowSetValue &lhs, const ORowSetValue &rhs) const override
virtual ORowSetValue operate(const ORowSetValue &lhs) const override
virtual ORowSetValue operate(const std::vector< ORowSetValue > &lhs) const override
OStringBuffer & padToLength(OStringBuffer &rBuffer, sal_Int32 nLength, char cFill='\0')
OUString getString(const Any &_rAny)
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)