hidl_string: Add cstr + length constructor

This will allow non-terminated strings to be turned into a hidl_string
with only one copy among other things.

Test: libhidl_test
Fixes: 34221748
Change-Id: I443f7920a65d23b7bcb583db55c3cec7266ec2d4
diff --git a/base/include/hidl/HidlSupport.h b/base/include/hidl/HidlSupport.h
index 106fb02..7477352 100644
--- a/base/include/hidl/HidlSupport.h
+++ b/base/include/hidl/HidlSupport.h
@@ -128,6 +128,8 @@
     hidl_string(const hidl_string &);
     // copy from a C-style string.
     hidl_string(const char *);
+    // copy the first length characters from a C-style string.
+    hidl_string(const char *, size_t length);
     // copy from an std::string.
     hidl_string(const std::string &);