function trim(text) {
    return text.replace(/^\s+|\s+$/g, '');
}
function ltrim(text) {
    return text.replace(/^\s+/g, '');
}
function rtrim(text) {
    return text.replace(/\s+$/g, '');
}
