implemented mtttier's StringToPosition and PositionToString