Add safe string copy primitives

Test: string_tests
Bug: 78198288
Change-Id: I711dc633ebbc87bc2fc564a2d75c2575d87934fd
4 files changed