javascript:
function ltrim ( str, charlist ) {
// Strip whitespace (or other characters) from the beginning of a string
//
// + original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
// + input by: Erkekjetter
// + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
charlist = !charlist ? ' \s\xA0' : charlist.replace(/([\[\]\(\)\.\?\/\*\{\}\+\$\^\:])/g, '\$1');
var re = new RegExp('^[' + charlist + ']+', 'g');
return str.replace(re, '');
}
//Примеры:
alert ( '«'+ltrim(' Kevin van Zonneveld ')+'»' );