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.uri; | |
6 | |
7 /** | 5 /** |
8 * Javascript-like URI encode/decode functions. | 6 * Javascript-like URI encode/decode functions. |
9 * The documentation here borrows heavily from the original Javascript | 7 * The documentation here borrows heavily from the original Javascript |
10 * doumentation on MDN at: | 8 * doumentation on MDN at: |
11 * https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects | 9 * https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects |
12 */ | 10 */ |
13 | 11 |
14 /** | 12 /** |
15 * A JavaScript-like URI encoder. Encodes Uniform Resource Identifier [uri] | 13 * A JavaScript-like URI encoder. Encodes Uniform Resource Identifier [uri] |
16 * by replacing each instance of certain characters by one, two, three, or four | 14 * by replacing each instance of certain characters by one, two, three, or four |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 if (i == text.length) | 139 if (i == text.length) |
142 break; | 140 break; |
143 ch = text[i]; | 141 ch = text[i]; |
144 } | 142 } |
145 result.add(decodeUtf8(codepoints)); | 143 result.add(decodeUtf8(codepoints)); |
146 } | 144 } |
147 } | 145 } |
148 return result.toString(); | 146 return result.toString(); |
149 } | 147 } |
150 | 148 |
OLD | NEW |