mirror of
https://github.com/google/blockly.git
synced 2026-01-10 02:17:09 +01:00
Remove goog.string
This commit is contained in:
@@ -28,8 +28,6 @@ goog.provide('Blockly.VariableModel');
|
||||
|
||||
goog.require('Blockly.Events.VarCreate');
|
||||
|
||||
goog.require('goog.string');
|
||||
|
||||
|
||||
/**
|
||||
* Class for a variable model.
|
||||
@@ -97,5 +95,13 @@ Blockly.VariableModel.prototype.getId = function() {
|
||||
* @package
|
||||
*/
|
||||
Blockly.VariableModel.compareByName = function(var1, var2) {
|
||||
return goog.string.caseInsensitiveCompare(var1.name, var2.name);
|
||||
var name1 = var1.name.toLowerCase();
|
||||
var name2 = var2.name.toLowerCase();
|
||||
if (name1 < name2) {
|
||||
return -1;
|
||||
} else if (name1 == name2) {
|
||||
return 0;
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user