Use string methods instead of functions from str package