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 968 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
979 fragment = _makeFragment(fragment, 0, fragment.length); | 979 fragment = _makeFragment(fragment, 0, fragment.length); |
980 } else if (this.hasFragment) { | 980 } else if (this.hasFragment) { |
981 fragment = this.fragment; | 981 fragment = this.fragment; |
982 } | 982 } |
983 | 983 |
984 return new Uri._internal( | 984 return new Uri._internal( |
985 scheme, userInfo, host, port, path, query, fragment); | 985 scheme, userInfo, host, port, path, query, fragment); |
986 } | 986 } |
987 | 987 |
988 /** | 988 /** |
| 989 * Returns a `Uri` that differs from this only in not having a fragment. |
| 990 * |
| 991 * If this `Uri` does not have a fragment, it is itself returned. |
| 992 */ |
| 993 Uri removeFragment() { |
| 994 if (!this.hasFragment) return this; |
| 995 return new Uri._internal(scheme, userInfo, host, port, path, query, null); |
| 996 } |
| 997 |
| 998 /** |
989 * Returns the URI path split into its segments. Each of the | 999 * Returns the URI path split into its segments. Each of the |
990 * segments in the returned list have been decoded. If the path is | 1000 * segments in the returned list have been decoded. If the path is |
991 * empty the empty list will be returned. A leading slash `/` does | 1001 * empty the empty list will be returned. A leading slash `/` does |
992 * not affect the segments returned. | 1002 * not affect the segments returned. |
993 * | 1003 * |
994 * The returned list is unmodifiable and will throw [UnsupportedError] on any | 1004 * The returned list is unmodifiable and will throw [UnsupportedError] on any |
995 * calls that would mutate it. | 1005 * calls that would mutate it. |
996 */ | 1006 */ |
997 List<String> get pathSegments { | 1007 List<String> get pathSegments { |
998 if (_pathSegments == null) { | 1008 if (_pathSegments == null) { |
(...skipping 1582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2581 0xafff, // 0x30 - 0x3f 1111111111110101 | 2591 0xafff, // 0x30 - 0x3f 1111111111110101 |
2582 // @ABCDEFGHIJKLMNO | 2592 // @ABCDEFGHIJKLMNO |
2583 0xffff, // 0x40 - 0x4f 1111111111111111 | 2593 0xffff, // 0x40 - 0x4f 1111111111111111 |
2584 // PQRSTUVWXYZ _ | 2594 // PQRSTUVWXYZ _ |
2585 0x87ff, // 0x50 - 0x5f 1111111111100001 | 2595 0x87ff, // 0x50 - 0x5f 1111111111100001 |
2586 // abcdefghijklmno | 2596 // abcdefghijklmno |
2587 0xfffe, // 0x60 - 0x6f 0111111111111111 | 2597 0xfffe, // 0x60 - 0x6f 0111111111111111 |
2588 // pqrstuvwxyz ~ | 2598 // pqrstuvwxyz ~ |
2589 0x47ff]; // 0x70 - 0x7f 1111111111100010 | 2599 0x47ff]; // 0x70 - 0x7f 1111111111100010 |
2590 } | 2600 } |
OLD | NEW |