Implemented string edit function