diff --git a/ndn-cpp/name.cpp b/ndn-cpp/name.cpp
index 11d284c..1eb25de 100644
--- a/ndn-cpp/name.cpp
+++ b/ndn-cpp/name.cpp
@@ -239,6 +239,29 @@
   return result.str();
 }
 
+Name
+Name::getSubName(size_t iStartComponent, size_t nComponents) const
+{
+  Name result;
+  
+  unsigned int iEnd = iStartComponent + nComponents;
+  for (unsigned int i = iStartComponent; i < iEnd && i < components_.size(); ++i)
+    result.components_.push_back(components_[i]);
+  
+  return result;
+}
+
+Name
+Name::getSubName(size_t iStartComponent) const
+{
+  Name result;
+  
+  for (unsigned int i = iStartComponent; i < components_.size(); ++i)
+    result.components_.push_back(components_[i]);
+  
+  return result;
+}
+
 bool 
 Name::match(const Name& name) const
 {
diff --git a/ndn-cpp/name.hpp b/ndn-cpp/name.hpp
index 12fbe79..1a1cf53 100644
--- a/ndn-cpp/name.hpp
+++ b/ndn-cpp/name.hpp
@@ -83,7 +83,7 @@
      * @param result the string stream to write to.
      */
     void 
-    toEscapedString(std::ostringstream& result)
+    toEscapedString(std::ostringstream& result) const
     {
       Name::toEscapedString(*value_, result);
     }
@@ -94,7 +94,7 @@
      * @return The escaped string.
      */
     std::string
-    toEscapedString()
+    toEscapedString() const
     {
       return Name::toEscapedString(*value_);
     }
@@ -241,6 +241,34 @@
   getComponent(unsigned int i) const { return components_[i]; }
   
   /**
+   * Get a new name, constructed as a subset of components.
+   * @param iStartComponent The index if the first component to get.
+   * @param nComponents The number of components starting at iStartComponent.
+   * @return A new name.
+   */
+  Name
+  getSubName(size_t iStartComponent, size_t nComponents) const;
+
+  /**
+   * Get a new name, constructed as a subset of components starting at iStartComponent until the end of the name.
+   * @param iStartComponent The index if the first component to get.
+   * @return A new name.
+   */
+  Name
+  getSubName(size_t iStartComponent) const;
+  
+  /**
+   * Return a new Name with the first nComponents components of this Name.
+   * @param nComponents The number of prefix components.
+   * @return A new Name.
+   */
+  Name
+  getPrefix(size_t nComponents) const
+  {
+    return getSubName(0, nComponents);
+  }
+  
+  /**
    * Encode this name as a URI.
    * @return The encoded URI.
    */
