Convergence of string-averaging method for a class of operators