MCPcopy Create free account
hub / github.com/NativeScript/android / consume_text

Method consume_text

test-app/runtime/src/main/cpp/ada/ada.h:9916–9934  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9914
9915template <url_pattern_encoding_callback F>
9916std::string url_pattern_parser<F>::consume_text() {
9917 // Let result be the empty string.
9918 std::string result{};
9919 // While true:
9920 while (true) {
9921 // Let token be the result of running try to consume a token given parser
9922 // and "char".
9923 auto token = try_consume_token(token_type::CHAR);
9924 // If token is null, then set token to the result of running try to consume
9925 // a token given parser and "escaped-char".
9926 if (!token) token = try_consume_token(token_type::ESCAPED_CHAR);
9927 // If token is null, then break.
9928 if (!token) break;
9929 // Append token's value to the end of result.
9930 result.append(token->value);
9931 }
9932 // Return result.
9933 return result;
9934}
9935
9936template <url_pattern_encoding_callback F>
9937bool url_pattern_parser<F>::consume_required_token(token_type type) {

Callers 1

parse_pattern_stringFunction · 0.80

Calls 1

appendMethod · 0.65

Tested by

no test coverage detected