| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 part of dart.core; | 5 part of dart.core; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * A parsed URI, such as a URL. | 8 * A parsed URI, such as a URL. |
| 9 * | 9 * |
| 10 * **See also:** | 10 * **See also:** |
| (...skipping 1190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1201 buffer.write(component.substring(sectionStart, end)); | 1201 buffer.write(component.substring(sectionStart, end)); |
| 1202 } | 1202 } |
| 1203 return buffer.toString(); | 1203 return buffer.toString(); |
| 1204 } | 1204 } |
| 1205 | 1205 |
| 1206 static bool _isSchemeCharacter(int ch) { | 1206 static bool _isSchemeCharacter(int ch) { |
| 1207 return ch < 128 && ((_schemeTable[ch >> 4] & (1 << (ch & 0x0f))) != 0); | 1207 return ch < 128 && ((_schemeTable[ch >> 4] & (1 << (ch & 0x0f))) != 0); |
| 1208 } | 1208 } |
| 1209 | 1209 |
| 1210 static bool _isGeneralDelimiter(int ch) { | 1210 static bool _isGeneralDelimiter(int ch) { |
| 1211 return ch <= 64 && | 1211 return ch <= _RIGHT_BRACKET && |
| 1212 ((_genDelimitersTable[ch >> 4] & (1 << (ch & 0x0f))) != 0); | 1212 ((_genDelimitersTable[ch >> 4] & (1 << (ch & 0x0f))) != 0); |
| 1213 } | 1213 } |
| 1214 | 1214 |
| 1215 /** | 1215 /** |
| 1216 * Returns whether the URI is absolute. | 1216 * Returns whether the URI is absolute. |
| 1217 */ | 1217 */ |
| 1218 bool get isAbsolute => scheme != "" && fragment == ""; | 1218 bool get isAbsolute => scheme != "" && fragment == ""; |
| 1219 | 1219 |
| 1220 String _merge(String base, String reference) { | 1220 String _merge(String base, String reference) { |
| 1221 if (base == "") return "/$reference"; | 1221 if (base == "") return "/$reference"; |
| (...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2078 // General delimiter characters, RFC 3986 section 2.2. | 2078 // General delimiter characters, RFC 3986 section 2.2. |
| 2079 // gen-delims = ":" / "/" / "?" / "#" / "[" / "]" / "@" | 2079 // gen-delims = ":" / "/" / "?" / "#" / "[" / "]" / "@" |
| 2080 // | 2080 // |
| 2081 static const _genDelimitersTable = const [ | 2081 static const _genDelimitersTable = const [ |
| 2082 // LSB MSB | 2082 // LSB MSB |
| 2083 // | | | 2083 // | | |
| 2084 0x0000, // 0x00 - 0x0f 0000000000000000 | 2084 0x0000, // 0x00 - 0x0f 0000000000000000 |
| 2085 0x0000, // 0x10 - 0x1f 0000000000000000 | 2085 0x0000, // 0x10 - 0x1f 0000000000000000 |
| 2086 // # / | 2086 // # / |
| 2087 0x8008, // 0x20 - 0x2f 0001000000000001 | 2087 0x8008, // 0x20 - 0x2f 0001000000000001 |
| 2088 // : [ ]? | 2088 // : ? |
| 2089 0xe400, // 0x30 - 0x3f 0000000000101011 | 2089 0x8400, // 0x30 - 0x3f 0000000000100001 |
| 2090 // @ | 2090 // @ |
| 2091 0x0001, // 0x40 - 0x4f 1000000000000000 | 2091 0x0001, // 0x40 - 0x4f 1000000000000000 |
| 2092 // | 2092 // [ ] |
| 2093 0x0000, // 0x50 - 0x5f 0000000000000000 | 2093 0x2800, // 0x50 - 0x5f 0000000000010100 |
| 2094 // | 2094 // |
| 2095 0x0000, // 0x60 - 0x6f 0000000000000000 | 2095 0x0000, // 0x60 - 0x6f 0000000000000000 |
| 2096 // | 2096 // |
| 2097 0x0000]; // 0x70 - 0x7f 0000000000000000 | 2097 0x0000]; // 0x70 - 0x7f 0000000000000000 |
| 2098 | 2098 |
| 2099 // Characters allowed in the userinfo as of RFC 3986. | 2099 // Characters allowed in the userinfo as of RFC 3986. |
| 2100 // RFC 3986 Apendix A | 2100 // RFC 3986 Apendix A |
| 2101 // userinfo = *( unreserved / pct-encoded / sub-delims / ':') | 2101 // userinfo = *( unreserved / pct-encoded / sub-delims / ':') |
| 2102 static const _userinfoTable = const [ | 2102 static const _userinfoTable = const [ |
| 2103 // LSB MSB | 2103 // LSB MSB |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2194 0xafff, // 0x30 - 0x3f 1111111111110101 | 2194 0xafff, // 0x30 - 0x3f 1111111111110101 |
| 2195 // @ABCDEFGHIJKLMNO | 2195 // @ABCDEFGHIJKLMNO |
| 2196 0xffff, // 0x40 - 0x4f 1111111111111111 | 2196 0xffff, // 0x40 - 0x4f 1111111111111111 |
| 2197 // PQRSTUVWXYZ _ | 2197 // PQRSTUVWXYZ _ |
| 2198 0x87ff, // 0x50 - 0x5f 1111111111100001 | 2198 0x87ff, // 0x50 - 0x5f 1111111111100001 |
| 2199 // abcdefghijklmno | 2199 // abcdefghijklmno |
| 2200 0xfffe, // 0x60 - 0x6f 0111111111111111 | 2200 0xfffe, // 0x60 - 0x6f 0111111111111111 |
| 2201 // pqrstuvwxyz ~ | 2201 // pqrstuvwxyz ~ |
| 2202 0x47ff]; // 0x70 - 0x7f 1111111111100010 | 2202 0x47ff]; // 0x70 - 0x7f 1111111111100010 |
| 2203 } | 2203 } |
| OLD | NEW |