Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/platform/utilities.js

Issue 2418813005: DevTools: [Persistence] implement automapping (Closed)
Patch Set: address comments Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2012 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 while (i !== -1) { 62 while (i !== -1) {
63 matches.push(i); 63 matches.push(i);
64 i = this.indexOf(string, i + string.length); 64 i = this.indexOf(string, i + string.length);
65 } 65 }
66 return matches; 66 return matches;
67 }; 67 };
68 68
69 /** 69 /**
70 * @return {string} 70 * @return {string}
71 */ 71 */
72 String.prototype.reverse = function()
73 {
74 return this.split("").reverse().join("");
75 }
76
77 /**
78 * @return {string}
79 */
72 String.prototype.replaceControlCharacters = function() 80 String.prototype.replaceControlCharacters = function()
73 { 81 {
74 // Replace C0 and C1 control character sets with printable character. 82 // Replace C0 and C1 control character sets with printable character.
75 // Do not replace '\t', \n' and '\r'. 83 // Do not replace '\t', \n' and '\r'.
76 return this.replace(/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u0080-\u009f]/g , "�"); 84 return this.replace(/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u0080-\u009f]/g , "�");
77 }; 85 };
78 86
79 /** 87 /**
80 * @return {boolean} 88 * @return {boolean}
81 */ 89 */
(...skipping 1458 matching lines...) Expand 10 before | Expand all | Expand 10 after
1540 while (rightIndex < rightKeys.length) { 1548 while (rightIndex < rightKeys.length) {
1541 var rightKey = rightKeys[rightIndex++]; 1549 var rightKey = rightKeys[rightIndex++];
1542 added.push(other.get(rightKey)); 1550 added.push(other.get(rightKey));
1543 } 1551 }
1544 return { 1552 return {
1545 added: added, 1553 added: added,
1546 removed: removed, 1554 removed: removed,
1547 equal: equal 1555 equal: equal
1548 }; 1556 };
1549 }; 1557 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698