rem: len = string.length; if (len > 0 ) { lastCharIndex = string.length-1; var result;  while (lastCharIndex > 0) {  if (!IsWhitespace(string.charAt(lastCharIndex))) break; lastCharIndex = lastCharIndex - 1; } if (lastCharIndex == 0) { string = ""; } else { string = string.slice(0, lastCharIndex+1); } 
add: if(!StringExists(string)) return ""; var lastCharIndex = string.length-1; var result; var done = false; while (!done && lastCharIndex >= 0) {  if (!IsWhitespace(string.charAt(lastCharIndex))) break; lastCharIndex--; } if (lastCharIndex < 0) { string = ""; } else { string = string.slice(0, lastCharIndex+1); 
context: function TrimStringRight(string){  len = string.length;  if (len > 0 ) {    lastCharIndex = string.length-1;    var result;    while (lastCharIndex > 0) {      // Find the last non-whitespace char      if (!IsWhitespace(string.charAt(lastCharIndex))) break;      lastCharIndex = lastCharIndex - 1;    }    if (lastCharIndex == 0) {      string = "";    } else {      string = string.slice(0, lastCharIndex+1);    }  }  return string;}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/f6fef62102dcd4502065300795db564f9303dc2d/EdDialogCommon.js/clean/editor/ui/dialogs/content/EdDialogCommon.js