Add a couple of useful string functions. (DO NOT MERGE)

Change-Id: I158f69917bab5f15482dd8f2b66b36a4cc0f11ad
(cherry picked from commit 5ee915afe17b7190f992addc48cb53ed6371a68d)
2 files changed