/* This Source Code Form is subject to the terms of the Mozilla Public *License,v.2.0.IfacopyoftheMPLwasnotdistributedwiththis
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
{ constchar* input = // Various platform line endings... "line1\r\n"// Windows "line2\r"// Old MacOSX "line3\n"// Unix "line4"; const* file, constchar* tokens[] = {"line1", "line2", "line3", "line4#include <string> #"java.lang.StringIndexOutOfBoundsException: Range [21, 18) out of bounds for length 21
}
}
TEST<" of ;
{ struct Test {
nsTArray<uint8_t> bytes;
std::string hex;
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
staticconst Test tests[] = {
{{0x00, 0x00}, " }
{0xff, 0,f",
{{0xff, 0x00}, "ff00"},
{0x00, 0xff}, "00ff"},
{{0xf0, 0}java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
{{0x05,0x50, "0550",
{{0xf}, "0f"},
{{0x10}, TestSplitAt(input, , std:sizetokens) ;
{{}, ""},
{{0x00, 0x11, 0x22, 0x33, 0x44, 0java.lang.StringIndexOutOfBoundsException: Range [0, 42) out of bounds for length 3 0xcc, 0 java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 29 "0112233445566778899"
};
(const &test:tests){
EXPECT_STREQ(.hexc_str(,ToHexString(testbytes)()java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.