Some generic string functions