Name: In set and fromEscapedString, support std::string as well as char *.
diff --git a/include/ndn-cpp/name.hpp b/include/ndn-cpp/name.hpp
index 50f50b2..0ece55c 100644
--- a/include/ndn-cpp/name.hpp
+++ b/include/ndn-cpp/name.hpp
@@ -296,12 +296,19 @@
/**
* Parse the uri according to the NDN URI Scheme and set the name with the components.
- * @param uri The URI string.
+ * @param uri The null-terminated URI string.
*/
void
set(const char *uri);
/**
+ * Parse the uri according to the NDN URI Scheme and set the name with the components.
+ * @param uri The URI string.
+ */
+ void
+ set(const std::string& uri) { set(uri.c_str()); }
+
+ /**
* Append a new component, copying from value of length valueLength.
* @return This name so that you can chain calls to append.
*/
@@ -531,6 +538,16 @@
fromEscapedString(const char *escapedString);
/**
+ * Make a Blob value by decoding the escapedString according to the NDN URI Scheme.
+ * If the escaped string is "", "." or ".." then return a Blob with a null pointer,
+ * which means the component should be skipped in a URI name.
+ * @param escapedString The escaped string.
+ * @return The Blob value. If the escapedString is not a valid escaped component, then the Blob is a null pointer.
+ */
+ static Blob
+ fromEscapedString(const std::string& escapedString) { return fromEscapedString(escapedString.c_str()); }
+
+ /**
* Write the value to result, escaping characters according to the NDN URI Scheme.
* This also adds "..." to a value with zero or more ".".
* @param value the buffer with the value to escape