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