implemented array interfaces on string class