Ruby Find Index Of Element In String Java