Added set(const char *uri)
diff --git a/ndn-cpp/name.cpp b/ndn-cpp/name.cpp
index 92d5234..8f8a161 100644
--- a/ndn-cpp/name.cpp
+++ b/ndn-cpp/name.cpp
@@ -190,8 +190,10 @@
   reverse(value_.begin() + 1, value_.end());
 }
 
-Name::Name(const char *uri_cstr) 
+void Name::set(const char *uri_cstr) 
 {
+  components_.clear();
+  
   string uri = uri_cstr;
   trim(uri);
   if (uri.size() == 0)