Merge "Minor refactor to support strings with embedded zeros." am: db2ffaa0f0
am: 417119922f

Change-Id: I0bf96057d2ced1d9bcab6698219ab742bd4399a2