First, how can i replace part of a string, in a string? str_replace(just a guess)?

Secondly, how can i determine what the letter is of a character anywhere in a string?
ex:
yaytaweuih

and then i want to find the 5th letter which is a