added snippet fn to string.clj