move opstring util methods from almanac