utils: prefer using stl than custom functions

Authored by apol on Jan 17 2020, 2:53 PM.