lib: refactor platform
utility methods
#53817
+27
−34
Merged