本文整理汇总了C++中CFX_ByteString::Delete方法的典型用法代码示例。如果您正苦于以下问题:C++ CFX_ByteString::Delete方法的具体用法?C++ CFX_ByteString::Delete怎么用?C++ CFX_ByteString::Delete使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFX_ByteString
的用法示例。
在下文中一共展示了CFX_ByteString::Delete方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DecodeAlphanumericSegment
void CBC_QRDecodedBitStreamParser::DecodeAlphanumericSegment(
CBC_CommonBitSource* bits,
CFX_ByteString& result,
int32_t count,
FX_BOOL fac1InEffect,
int32_t& e) {
int32_t start = result.GetLength();
while (count > 1) {
int32_t nextTwoCharsBits = bits->ReadBits(11, e);
BC_EXCEPTION_CHECK_ReturnVoid(e);
BC_FX_ByteString_Append(result, 1,
ALPHANUMERIC_CHARS[nextTwoCharsBits / 45]);
BC_FX_ByteString_Append(result, 1,
ALPHANUMERIC_CHARS[nextTwoCharsBits % 45]);
count -= 2;
}
if (count == 1) {
int32_t itemp = bits->ReadBits(6, e);
BC_EXCEPTION_CHECK_ReturnVoid(e);
BC_FX_ByteString_Append(result, 1, ALPHANUMERIC_CHARS[itemp]);
}
if (fac1InEffect) {
for (int32_t i = start; i < result.GetLength(); i++) {
if (result[i] == '%') {
if ((i < result.GetLength() - 1) && result[i + 1] == '%') {
result.Delete(i + 1, 1);
} else {
result.SetAt(i, (FX_CHAR)0x1d);
}
}
}
}
}
示例2: not_aliased
TEST(fxcrt, ByteStringConcatInPlace) {
CFX_ByteString fred;
fred.ConcatInPlace(4, "FRED");
EXPECT_EQ("FRED", fred);
fred.ConcatInPlace(2, "DY");
EXPECT_EQ("FREDDY", fred);
fred.Delete(3, 3);
EXPECT_EQ("FRE", fred);
fred.ConcatInPlace(1, "D");
EXPECT_EQ("FRED", fred);
CFX_ByteString copy = fred;
fred.ConcatInPlace(2, "DY");
EXPECT_EQ("FREDDY", fred);
EXPECT_EQ("FRED", copy);
// Test invalid arguments.
copy = fred;
fred.ConcatInPlace(-6, "freddy");
CFX_ByteString not_aliased("xxxxxx");
EXPECT_EQ("FREDDY", fred);
EXPECT_EQ("xxxxxx", not_aliased);
}
示例3: MaybeReturnResult
CFX_ByteString CBC_OnedUPCAReader::MaybeReturnResult(CFX_ByteString& result,
int32_t& e) {
if (result[0] == '0') {
result.Delete(0);
return result;
} else {
e = BCExceptionFormatException;
return "";
}
return "";
}
示例4: GetFont
void CPDF_DefaultAppearance::GetFont(CFX_ByteString& csFontNameTag,
FX_FLOAT& fFontSize) {
csFontNameTag = "";
fFontSize = 0;
if (m_csDA.IsEmpty()) {
return;
}
CPDF_SimpleParser syntax(m_csDA);
if (syntax.FindTagParam("Tf", 2)) {
csFontNameTag = (CFX_ByteString)syntax.GetWord();
csFontNameTag.Delete(0, 1);
fFontSize = FX_atof((CFX_ByteString)syntax.GetWord());
}
csFontNameTag = PDF_NameDecode(csFontNameTag);
}