diff --git a/closure/goog/string/string.js b/closure/goog/string/string.js index 1f1bbe71b3..be66a98759 100644 --- a/closure/goog/string/string.js +++ b/closure/goog/string/string.js @@ -1120,27 +1120,6 @@ goog.string.makeSafe = function(obj) { return obj == null ? '' : String(obj); }; - -/** - * Concatenates string expressions. This is useful - * since some browsers are very inefficient when it comes to using plus to - * concat strings. Be careful when using null and undefined here since - * these will not be included in the result. If you need to represent these - * be sure to cast the argument to a String first. - * For example: - *
buildString('a', 'b', 'c', 'd') -> 'abcd'
- * buildString(null, undefined) -> ''
- * 
- * @param {...*} var_args A list of strings to concatenate. If not a string, - * it will be casted to one. - * @return {string} The concatenation of `var_args`. - */ -goog.string.buildString = function(var_args) { - 'use strict'; - return Array.prototype.join.call(arguments, ''); -}; - - /** * Returns a string with at least 64-bits of randomness. * diff --git a/closure/goog/string/string_test.js b/closure/goog/string/string_test.js index f385fc93d6..eca798a067 100644 --- a/closure/goog/string/string_test.js +++ b/closure/goog/string/string_test.js @@ -1036,18 +1036,6 @@ testSuite({ assertEquals('foofoofoofoofoofoo', googString.repeat('foo', 6)); }, - testBuildString() { - assertEquals('', googString.buildString()); - assertEquals('a', googString.buildString('a')); - assertEquals('ab', googString.buildString('ab')); - assertEquals('ab', googString.buildString('a', 'b')); - assertEquals('abcd', googString.buildString('a', 'b', 'c', 'd')); - assertEquals('0', googString.buildString(0)); - assertEquals('0123', googString.buildString(0, 1, 2, 3)); - assertEquals('ab01', googString.buildString('a', 'b', 0, 1)); - assertEquals('', googString.buildString(null, undefined)); - }, - testCompareVersions() { const f = googString.compareVersions; assertTrue('numeric equality broken', f(1, 1) == 0);