This function was originally contributed by another visitor and I corrected the logic to return the max position of the character if occurrence is greater than the max.
I hope everyone finds it useful.
2004-10-01 (first published: 2002-06-20)
15,465 reads
