diff --git a/ndn-cpp/name.cpp b/ndn-cpp/name.cpp
index 0b8ab91..d94eecd 100644
--- a/ndn-cpp/name.cpp
+++ b/ndn-cpp/name.cpp
@@ -103,9 +103,9 @@
   return result.str();
 }
 
-bool Name::Component::setFromEscapedString(const char *first, const char *last)
+bool Name::Component::setFromEscapedString(const char *escapedString, unsigned int beginOffset, unsigned int endOffset)
 {
-  string trimmedString(first, last);
+  string trimmedString(escapedString + beginOffset, escapedString + endOffset);
   trim(trimmedString);
   string component = unescape(trimmedString);
         
@@ -190,7 +190,7 @@
       iComponentEnd = uri.size();
     
     components_.push_back(Component());
-    if (!components_[components_.size() - 1].setFromEscapedString(&uri[iComponentStart], &uri[iComponentEnd]))
+    if (!components_[components_.size() - 1].setFromEscapedString(&uri[0], iComponentStart, iComponentEnd))
       // Ignore the illegal component.  This also gets rid of a trailing '/'.
       components_.pop_back();
     
diff --git a/ndn-cpp/name.hpp b/ndn-cpp/name.hpp
index 587b8ee..587301c 100644
--- a/ndn-cpp/name.hpp
+++ b/ndn-cpp/name.hpp
@@ -18,6 +18,9 @@
     
 class Name {
 public:
+  /**
+   * A Name::Component is holds an immutable name component value.
+   */
   class Component {
   public:
     /**
@@ -69,19 +72,20 @@
         componentStruct.value = 0;
     }
   
-    /**
-     * Set this component value by decoding the escapedString between first and last according to the NDN URI Scheme.
-     * If the escaped string is "", "." or ".." then return false, which means this component value was not changed, and
-     * the component should be skipped in a URI name.
-     * @param first Pointer to the beginning of the escaped string
-     * @param last Pointer to the first character past the end of the escaped string
-     * @return True for success, false if escapedString is not a valid escaped component.
-     */
-    bool setFromEscapedString(const char *first, const char *last);
-  
     const Blob& getValue() const { return value_; }
     
     void setValue(const Blob& value) { value_ = value; }
+  
+    /**
+     * Set this component value by decoding the escapedString between beginOffset and endOffset according to the NDN URI Scheme.
+     * If the escaped string is "", "." or ".." then return false, which means this component value was not changed, and
+     * the component should be skipped in a URI name.
+     * @param escapedString The escaped string.  It does not need to be null-terminated because we only scan to endOffset.
+     * @param beginOffset The offset in escapedString of the beginning of the portion to decode.
+     * @param endOffset The offset in escapedString of the end of the portion to decode.
+     * @return True for success, false if escapedString is not a valid escaped component.
+     */
+    bool setFromEscapedString(const char *escapedString, unsigned int beginOffset, unsigned int endOffset);
     
     /**
      * Set this component to the encoded segment number.
