OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 inString = true; | 146 inString = true; |
147 else if (character === "{") | 147 else if (character === "{") |
148 ++counter; | 148 ++counter; |
149 else if (character === "}") { | 149 else if (character === "}") { |
150 if (--counter === 0) | 150 if (--counter === 0) |
151 return index + 1; | 151 return index + 1; |
152 } | 152 } |
153 } | 153 } |
154 } | 154 } |
155 return -1; | 155 return -1; |
| 156 }, |
| 157 |
| 158 /** |
| 159 * @param {string} text |
| 160 * @return {boolean} |
| 161 */ |
| 162 isUpperCase: function(text) |
| 163 { |
| 164 return text === text.toUpperCase(); |
| 165 }, |
| 166 |
| 167 /** |
| 168 * @param {string} text |
| 169 * @return {boolean} |
| 170 */ |
| 171 isLowerCase: function(text) |
| 172 { |
| 173 return text === text.toLowerCase(); |
156 } | 174 } |
157 } | 175 } |
158 | 176 |
159 WebInspector.TextUtils._SpaceCharRegex = /\s/; | 177 WebInspector.TextUtils._SpaceCharRegex = /\s/; |
160 | 178 |
161 /** | 179 /** |
162 * @enum {string} | 180 * @enum {string} |
163 */ | 181 */ |
164 WebInspector.TextUtils.Indent = { | 182 WebInspector.TextUtils.Indent = { |
165 TwoSpaces: " ", | 183 TwoSpaces: " ", |
166 FourSpaces: " ", | 184 FourSpaces: " ", |
167 EightSpaces: " ", | 185 EightSpaces: " ", |
168 TabCharacter: "\t" | 186 TabCharacter: "\t" |
169 } | 187 } |
OLD | NEW |