Decimal128::Decimal128(std::string stringValue, std::uint32_t* signalingFlags, RoundingMode roundMode) { std::string lower = toAsciiLowerCase(stringValue); BID_UINT128 dec128; // The intel library function requires a char * while c_str() returns a const char*. // We're using const_cast here since the library function should not modify the input. dec128 = bid128_from_string(const_cast<char*>(lower.c_str()), roundMode, signalingFlags); validateInputString(StringData(lower), signalingFlags); _value = libraryTypeToValue(dec128); }
void nsHtml5MetaScanner::handleCharInAttributeValue(PRInt32 c) { if (metaState == NS_HTML5META_SCANNER_A) { if (contentIndex == CONTENT.length || charsetIndex == CHARSET.length) { addToBuffer(c); } else if (httpEquivIndex == HTTP_EQUIV.length) { if (contentTypeIndex < CONTENT_TYPE.length && toAsciiLowerCase(c) == CONTENT_TYPE[contentTypeIndex]) { ++contentTypeIndex; } else { contentTypeIndex = PR_INT32_MAX; } } } }