Refatoring some static String utilities