anchor.diff:    exit lSelf.Substring(lStart, lEnd - lStart);
   end;
   
  -method GlobalObject.StringSplit(aCaller: ExecutionContext;aSelf: Object; params args: Array of Object): Object;
  -begin
  -  var lSelf := Coalesce(Utilities.GetObjAsString(aSelf, aCaller), String.Empty);
  -  var lNeedle := Coalesce(Utilities.GetArgAsString(args, 0, aCaller), String.Empty);
  +
  +method GlobalObject.StringSplit(aCaller: ExecutionContext;  aSelf: Object;  params args: array of Object): Object;
  +begin
  +  var lSelf := coalesce(Utilities.GetObjAsString(aSelf, aCaller), String.Empty);
  +  var lNeedle := coalesce(Utilities.GetArgAsString(args, 0, aCaller), String.Empty);
     var lMax := Utilities.GetArgAsInteger(args, 1, aCaller);
  -  if lMax <= 0 then lMax := Int32.MaxValue;
  -  {$IFDEF SILVERLIGHT} 
  +
  +  if  (lMax <= 0)  then
  +    lMax := Int32.MaxValue;
  +{$IFDEF SILVERLIGHT} 
     var lValues := lSelf.Split([lNeedle], StringSplitOptions.None);
     if lValues.length > lMax then begin
       result := new EcmaScriptArrayObject(self, 0);
  
positive.code:     exit;
    end else
      exit new EcmaScriptArrayObject(self, 0).AddValues(lValues);
    {$ELSE}
    exit new EcmaScriptArrayObject(self, 0).AddValues(lSelf.Split([lNeedle], lMax, StringSplitOptions.None));
    {$ENDIF}
  end;
  
  method GlobalObject.StringSubString(aCaller: ExecutionContext;aSelf: Object; params args: Array of Object): Object;
  begin
    exit StringSlice(aCaller, aSelf, Args);
  end;
  
  method GlobalObject.StringToLowerCase(aCaller: ExecutionContext;aSelf: Object; params args: Array of Object): Object;
  begin
    var lSelf: string := string(aSelf);
    if (lSelf = nil) and (aSelf is EcmaScriptObject) then
      lSelf := string(EcmaScriptObject(aSelf).Value);
    if lSelf = nil then RaiseNativeError(NativeErrorType.TypeError, 'String.prototype.toLowerCase is not generic');
    exit lSelf.ToLowerInvariant;
  end;
  
  method GlobalObject.StringToUpperCase(aCaller: ExecutionContext;aSelf: Object; params args: Array of Object): Object;
  begin
    var lSelf: string := string(aSelf);
    if (lSelf = nil) and (aSelf is EcmaScriptObject) then
      lSelf := string(EcmaScriptObject(aSelf).Value);
    if lSelf = nil then RaiseNativeError(NativeErrorType.TypeError, 'String.prototype.toUpperCase is not generic');
    exit lSelf.ToUpperInvariant;
  end;
  
  method GlobalObject.StringToLocaleLowerCase(aCaller: ExecutionContext;aSelf: Object; params args: Array of Object): Object;
  begin
    var lSelf: string := string(aSelf);
    if (lSelf = nil) and (aSelf is EcmaScriptObject) then
      lSelf := string(EcmaScriptObject(aSelf).Value);
    if lSelf = nil then RaiseNativeError(NativeErrorType.TypeError, 'String.prototype.toLocaleLowerCase is not generic');
    exit lSelf.ToLower;
  end;
  
  method GlobalObject.StringToLocaleUpperCase(aCaller: ExecutionContext;aSelf: Object; params args: Array of Object): Object;
  begin
      var lSelf: string := string(aSelf);
    if (lSelf = nil) and (aSelf is EcmaScriptObject) then
      lSelf := string(EcmaScriptObject(aSelf).Value);
    if lSelf = nil then RaiseNativeError(NativeErrorType.TypeError, 'String.prototype.toLocaleUpperCase is not generic');
    exit lSelf.ToUpper;
  end;
  
  method GlobalObject.StringSearch(aCaller: ExecutionContext;aSelf: Object; params args: Array of Object): Object;
  begin
    var lSelf := Coalesce(Utilities.GetObjAsString(aSelf, aCaller), String.Empty);
    var lObj: EcmaScriptRegexpObject;
    if (Length(args) = 0) or (args[0] is not EcmaScriptRegexpObject) then begin
      lObj := new EcmaScriptRegexpObject(self, Utilities.GetArgAsString(args,0, aCaller), '');
    end else lObj := EcmaScriptRegexpObject(args[0]);
  
    try
    var lMatch := lObj.Regex.Match(lSelf);
    exit iif((lMatch = nil) or not lMatch.Success, -1, lMatch.Index);
    except
      on e: Exception do 
      RaiseNativeError(NativeErrorType.SyntaxError, e.Message);
    end;
  end;
  
  method GlobalObject.StringMatch(aCaller: ExecutionContext;aSelf: Object; params args: Array of Object): Object;
  begin
    var lSelf := Coalesce(Utilities.GetObjAsString(aSelf, aCaller), String.Empty);
    var lObj: EcmaScriptRegexpObject;
    if (Length(args) = 0) or (args[0] is not EcmaScriptRegexpObject) then begin
      lObj := new EcmaScriptRegexpObject(self, Utilities.GetArgAsString(args,0, aCaller), '');
    end else lObj := EcmaScriptRegexpObject(args[0]);
    if not lObj.GlobalVal then exit RegExpExec(aCaller, lObj, lSelf);
    
    var lRealResult := new EcmaScriptArrayObject(self, 0);
  
  
negative.code:       var lThisIndex := Utilities.GetObjAsInteger(lObj.Get(aCaller, 0, 'lastIndex'), aCaller);
        if lThisIndex = lPrevLastIndex then begin
          lPrevLastIndex := lThisIndex + 1;
          lObj.LastIndex := lPrevLastIndex;
        end else
          lPrevLastIndex := lThisIndex;
        var lMatchStr := lRes.Get(aCaller, 2, '0');
        lRealResult.AddValue(lMatchStr);
      end;
    end;
  
    if  (lRealResult.Length = 0)  then
      exit  (nil);
  
    exit  (lRealResult);
  end;
  
  
  method GlobalObject.StringLocaleCompare(aCaller: ExecutionContext;  aSelf: Object;  params args: array of Object): Object;
  begin
    if (aSelf = nil) or (aSelf = Undefined.Instance) then RaiseNativeError(NativeErrorType.TypeError, 'null/undefined not coercible');
    exit String.Compare(Utilities.GetObjAsString(aSelf, aCaller), Utilities.GetArgAsString(args, 0, aCaller), StringComparison.CurrentCulture);
  end;
  
  
  method GlobalObject.StringTrim(aCaller: ExecutionContext;  aSelf: Object;  params args: array of Object): Object;
  begin
    if (aSelf = nil) or (aSelf = Undefined.Instance) then RaiseNativeError(NativeErrorType.TypeError, 'null/undefined not coercible');
    exit Utilities.GetObjAsString(aSelf, aCaller).Trim();
  end;
  
  
  method EcmaScriptStringObject.Call(context: ExecutionContext; params args: array of Object): Object;
  begin
    exit Root.StringCall(context, self, args);
  end;
  
  
  method EcmaScriptStringObject.Construct(context: ExecutionContext; params args: array of Object): Object;
  begin
    exit Root.StringCtor(context, self, args);
  