Update String.php

Bugfixing and PSR-2 compliance.