lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nwelln...@apache.org
Subject [lucy-commits] [12/24] Rename CharBuf to String (cnick Str)
Date Sun, 01 Sep 2013 20:17:00 GMT
http://git-wip-us.apache.org/repos/asf/lucy/blob/2c3dbf15/clownfish/runtime/core/Clownfish/Test/TestVArray.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/Test/TestVArray.c b/clownfish/runtime/core/Clownfish/Test/TestVArray.c
index a1c5c8e..7f7b72b 100644
--- a/clownfish/runtime/core/Clownfish/Test/TestVArray.c
+++ b/clownfish/runtime/core/Clownfish/Test/TestVArray.c
@@ -23,7 +23,7 @@
 
 #include "Clownfish/Test/TestVArray.h"
 
-#include "Clownfish/CharBuf.h"
+#include "Clownfish/String.h"
 #include "Clownfish/Err.h"
 #include "Clownfish/Num.h"
 #include "Clownfish/Test.h"
@@ -79,24 +79,24 @@ test_Equals(TestBatchRunner *runner) {
 static void
 test_Store_Fetch(TestBatchRunner *runner) {
     VArray *array = VA_new(0);
-    CharBuf *elem;
+    String *elem;
 
     TEST_TRUE(runner, VA_Fetch(array, 2) == NULL, "Fetch beyond end");
 
-    VA_Store(array, 2, (Obj*)CB_newf("foo"));
-    elem = (CharBuf*)CERTIFY(VA_Fetch(array, 2), CHARBUF);
+    VA_Store(array, 2, (Obj*)Str_newf("foo"));
+    elem = (String*)CERTIFY(VA_Fetch(array, 2), STRING);
     TEST_INT_EQ(runner, 3, VA_Get_Size(array), "Store updates size");
-    TEST_TRUE(runner, CB_Equals_Str(elem, "foo", 3), "Store");
+    TEST_TRUE(runner, Str_Equals_Str(elem, "foo", 3), "Store");
 
     INCREF(elem);
-    TEST_INT_EQ(runner, 2, CB_Get_RefCount(elem),
+    TEST_INT_EQ(runner, 2, Str_Get_RefCount(elem),
                 "start with refcount of 2");
-    VA_Store(array, 2, (Obj*)CB_newf("bar"));
-    TEST_INT_EQ(runner, 1, CB_Get_RefCount(elem),
+    VA_Store(array, 2, (Obj*)Str_newf("bar"));
+    TEST_INT_EQ(runner, 1, Str_Get_RefCount(elem),
                 "Displacing elem via Store updates refcount");
     DECREF(elem);
-    elem = (CharBuf*)CERTIFY(VA_Fetch(array, 2), CHARBUF);
-    TEST_TRUE(runner, CB_Equals_Str(elem, "bar", 3), "Store displacement");
+    elem = (String*)CERTIFY(VA_Fetch(array, 2), STRING);
+    TEST_TRUE(runner, Str_Equals_Str(elem, "bar", 3), "Store displacement");
 
     DECREF(array);
 }
@@ -104,29 +104,29 @@ test_Store_Fetch(TestBatchRunner *runner) {
 static void
 test_Push_Pop_Shift_Unshift(TestBatchRunner *runner) {
     VArray *array = VA_new(0);
-    CharBuf *elem;
+    String *elem;
 
     TEST_INT_EQ(runner, VA_Get_Size(array), 0, "size starts at 0");
-    VA_Push(array, (Obj*)CB_newf("a"));
-    VA_Push(array, (Obj*)CB_newf("b"));
-    VA_Push(array, (Obj*)CB_newf("c"));
+    VA_Push(array, (Obj*)Str_newf("a"));
+    VA_Push(array, (Obj*)Str_newf("b"));
+    VA_Push(array, (Obj*)Str_newf("c"));
 
     TEST_INT_EQ(runner, VA_Get_Size(array), 3, "size after Push");
-    TEST_TRUE(runner, NULL != CERTIFY(VA_Fetch(array, 2), CHARBUF), "Push");
+    TEST_TRUE(runner, NULL != CERTIFY(VA_Fetch(array, 2), STRING), "Push");
 
-    elem = (CharBuf*)CERTIFY(VA_Shift(array), CHARBUF);
-    TEST_TRUE(runner, CB_Equals_Str(elem, "a", 1), "Shift");
+    elem = (String*)CERTIFY(VA_Shift(array), STRING);
+    TEST_TRUE(runner, Str_Equals_Str(elem, "a", 1), "Shift");
     TEST_INT_EQ(runner, VA_Get_Size(array), 2, "size after Shift");
     DECREF(elem);
 
-    elem = (CharBuf*)CERTIFY(VA_Pop(array), CHARBUF);
-    TEST_TRUE(runner, CB_Equals_Str(elem, "c", 1), "Pop");
+    elem = (String*)CERTIFY(VA_Pop(array), STRING);
+    TEST_TRUE(runner, Str_Equals_Str(elem, "c", 1), "Pop");
     TEST_INT_EQ(runner, VA_Get_Size(array), 1, "size after Pop");
     DECREF(elem);
 
-    VA_Unshift(array, (Obj*)CB_newf("foo"));
-    elem = (CharBuf*)CERTIFY(VA_Fetch(array, 0), CHARBUF);
-    TEST_TRUE(runner, CB_Equals_Str(elem, "foo", 3), "Unshift");
+    VA_Unshift(array, (Obj*)Str_newf("foo"));
+    elem = (String*)CERTIFY(VA_Fetch(array, 0), STRING);
+    TEST_TRUE(runner, Str_Equals_Str(elem, "foo", 3), "Unshift");
     TEST_INT_EQ(runner, VA_Get_Size(array), 2, "size after Shift");
 
     DECREF(array);
@@ -138,10 +138,10 @@ test_Delete(TestBatchRunner *runner) {
     VArray *got    = VA_new(5);
     uint32_t i;
 
-    for (i = 0; i < 5; i++) { VA_Push(got, (Obj*)CB_newf("%u32", i)); }
-    VA_Store(wanted, 0, (Obj*)CB_newf("0", i));
-    VA_Store(wanted, 1, (Obj*)CB_newf("1", i));
-    VA_Store(wanted, 4, (Obj*)CB_newf("4", i));
+    for (i = 0; i < 5; i++) { VA_Push(got, (Obj*)Str_newf("%u32", i)); }
+    VA_Store(wanted, 0, (Obj*)Str_newf("0", i));
+    VA_Store(wanted, 1, (Obj*)Str_newf("1", i));
+    VA_Store(wanted, 4, (Obj*)Str_newf("4", i));
     DECREF(VA_Delete(got, 2));
     DECREF(VA_Delete(got, 3));
     TEST_TRUE(runner, VA_Equals(wanted, (Obj*)got), "Delete");
@@ -155,7 +155,7 @@ test_Resize(TestBatchRunner *runner) {
     VArray *array = VA_new(3);
     uint32_t i;
 
-    for (i = 0; i < 2; i++) { VA_Push(array, (Obj*)CB_newf("%u32", i)); }
+    for (i = 0; i < 2; i++) { VA_Push(array, (Obj*)Str_newf("%u32", i)); }
     TEST_INT_EQ(runner, VA_Get_Capacity(array), 3, "Start with capacity 3");
 
     VA_Resize(array, 4);
@@ -176,8 +176,8 @@ test_Excise(TestBatchRunner *runner) {
     VArray *got    = VA_new(5);
 
     for (uint32_t i = 0; i < 5; i++) {
-        VA_Push(wanted, (Obj*)CB_newf("%u32", i));
-        VA_Push(got, (Obj*)CB_newf("%u32", i));
+        VA_Push(wanted, (Obj*)Str_newf("%u32", i));
+        VA_Push(got, (Obj*)Str_newf("%u32", i));
     }
 
     VA_Excise(got, 7, 1);
@@ -214,9 +214,9 @@ test_Push_VArray(TestBatchRunner *runner) {
     VArray *scratch = VA_new(0);
     uint32_t i;
 
-    for (i = 0; i < 4; i++) { VA_Push(wanted, (Obj*)CB_newf("%u32", i)); }
-    for (i = 0; i < 2; i++) { VA_Push(got, (Obj*)CB_newf("%u32", i)); }
-    for (i = 2; i < 4; i++) { VA_Push(scratch, (Obj*)CB_newf("%u32", i)); }
+    for (i = 0; i < 4; i++) { VA_Push(wanted, (Obj*)Str_newf("%u32", i)); }
+    for (i = 0; i < 2; i++) { VA_Push(got, (Obj*)Str_newf("%u32", i)); }
+    for (i = 2; i < 4; i++) { VA_Push(scratch, (Obj*)Str_newf("%u32", i)); }
 
     VA_Push_VArray(got, scratch);
     TEST_TRUE(runner, VA_Equals(wanted, (Obj*)got), "Push_VArray");
@@ -229,7 +229,7 @@ test_Push_VArray(TestBatchRunner *runner) {
 static void
 test_Slice(TestBatchRunner *runner) {
     VArray *array = VA_new(0);
-    for (uint32_t i = 0; i < 10; i++) { VA_Push(array, (Obj*)CB_newf("%u32", i)); }
+    for (uint32_t i = 0; i < 10; i++) { VA_Push(array, (Obj*)Str_newf("%u32", i)); }
     {
         VArray *slice = VA_Slice(array, 0, 10);
         TEST_TRUE(runner, VA_Equals(array, (Obj*)slice), "Slice entire array");
@@ -243,7 +243,7 @@ test_Slice(TestBatchRunner *runner) {
     }
     {
         VArray *wanted = VA_new(0);
-        VA_Push(wanted, (Obj*)CB_newf("9"));
+        VA_Push(wanted, (Obj*)Str_newf("9"));
         VArray *slice = VA_Slice(array, 9, 11);
         TEST_TRUE(runner, VA_Equals(slice, (Obj*)wanted),
             "Exceed length, start near end");
@@ -262,7 +262,7 @@ test_Slice(TestBatchRunner *runner) {
     }
     {
         VArray *wanted = VA_new(0);
-        VA_Push(wanted, (Obj*)CB_newf("9"));
+        VA_Push(wanted, (Obj*)Str_newf("9"));
         VArray *slice = VA_Slice(array, 9, UINT32_MAX - 1);
         TEST_TRUE(runner, VA_Get_Size(slice) == 1, "guard against overflow");
         DECREF(slice);
@@ -278,7 +278,7 @@ test_Clone_and_Shallow_Copy(TestBatchRunner *runner) {
     uint32_t i;
 
     for (i = 0; i < 10; i++) {
-        VA_Push(array, (Obj*)CB_newf("%u32", i));
+        VA_Push(array, (Obj*)Str_newf("%u32", i));
     }
     twin = VA_Shallow_Copy(array);
     TEST_TRUE(runner, VA_Equals(array, (Obj*)twin), "Shallow_Copy");

http://git-wip-us.apache.org/repos/asf/lucy/blob/2c3dbf15/clownfish/runtime/core/Clownfish/Test/Util/TestStringHelper.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/Test/Util/TestStringHelper.c b/clownfish/runtime/core/Clownfish/Test/Util/TestStringHelper.c
index f9d36cf..2ecb528 100644
--- a/clownfish/runtime/core/Clownfish/Test/Util/TestStringHelper.c
+++ b/clownfish/runtime/core/Clownfish/Test/Util/TestStringHelper.c
@@ -21,7 +21,7 @@
 
 #include "Clownfish/Test/Util/TestStringHelper.h"
 
-#include "Clownfish/CharBuf.h"
+#include "Clownfish/String.h"
 #include "Clownfish/Err.h"
 #include "Clownfish/Test.h"
 #include "Clownfish/TestHarness/TestBatchRunner.h"

http://git-wip-us.apache.org/repos/asf/lucy/blob/2c3dbf15/clownfish/runtime/core/Clownfish/TestHarness/TestBatchRunner.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/TestHarness/TestBatchRunner.c b/clownfish/runtime/core/Clownfish/TestHarness/TestBatchRunner.c
index bccf6fc..0e81e04 100644
--- a/clownfish/runtime/core/Clownfish/TestHarness/TestBatchRunner.c
+++ b/clownfish/runtime/core/Clownfish/TestHarness/TestBatchRunner.c
@@ -23,7 +23,7 @@
 
 #include "Clownfish/TestHarness/TestBatchRunner.h"
 
-#include "Clownfish/CharBuf.h"
+#include "Clownfish/String.h"
 #include "Clownfish/Err.h"
 #include "Clownfish/TestHarness/TestBatch.h"
 #include "Clownfish/TestHarness/TestFormatter.h"
@@ -79,7 +79,7 @@ TestBatchRunner_Run_Batch_IMP(TestBatchRunner *self, TestBatch *batch) {
     bool failed = false;
     if (err) {
         failed = true;
-        CharBuf *mess = Err_Get_Mess(err);
+        String *mess = Err_Get_Mess(err);
         INCREF(mess);
         Err_warn_mess(mess);
     }

http://git-wip-us.apache.org/repos/asf/lucy/blob/2c3dbf15/clownfish/runtime/core/Clownfish/TestHarness/TestFormatter.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/TestHarness/TestFormatter.c b/clownfish/runtime/core/Clownfish/TestHarness/TestFormatter.c
index 0db6bc1..6088c89 100644
--- a/clownfish/runtime/core/Clownfish/TestHarness/TestFormatter.c
+++ b/clownfish/runtime/core/Clownfish/TestHarness/TestFormatter.c
@@ -24,7 +24,7 @@
 
 #include "Clownfish/TestHarness/TestFormatter.h"
 
-#include "Clownfish/CharBuf.h"
+#include "Clownfish/String.h"
 #include "Clownfish/Err.h"
 #include "Clownfish/TestHarness/TestBatch.h"
 #include "Clownfish/TestHarness/TestSuiteRunner.h"
@@ -78,8 +78,8 @@ TestFormatterCF_Batch_Prologue_IMP(TestFormatterCF *self, TestBatch *batch,
                                    uint32_t num_planned) {
     UNUSED_VAR(self);
     UNUSED_VAR(num_planned);
-    CharBuf *class_name = TestBatch_Get_Class_Name(batch);
-    printf("Running %s...\n", CB_Get_Ptr8(class_name));
+    String *class_name = TestBatch_Get_Class_Name(batch);
+    printf("Running %s...\n", Str_Get_Ptr8(class_name));
 }
 
 void

http://git-wip-us.apache.org/repos/asf/lucy/blob/2c3dbf15/clownfish/runtime/core/Clownfish/TestHarness/TestSuite.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/TestHarness/TestSuite.c b/clownfish/runtime/core/Clownfish/TestHarness/TestSuite.c
index 4c8b132..a396b16 100644
--- a/clownfish/runtime/core/Clownfish/TestHarness/TestSuite.c
+++ b/clownfish/runtime/core/Clownfish/TestHarness/TestSuite.c
@@ -25,7 +25,7 @@
 
 #include "Clownfish/TestHarness/TestSuite.h"
 
-#include "Clownfish/CharBuf.h"
+#include "Clownfish/String.h"
 #include "Clownfish/Err.h"
 #include "Clownfish/TestHarness/TestBatch.h"
 #include "Clownfish/TestHarness/TestBatchRunner.h"
@@ -61,7 +61,7 @@ TestSuite_Add_Batch_IMP(TestSuite *self, TestBatch *batch) {
 }
 
 bool
-TestSuite_Run_Batch_IMP(TestSuite *self, CharBuf *class_name,
+TestSuite_Run_Batch_IMP(TestSuite *self, String *class_name,
                     TestFormatter *formatter) {
     S_unbuffer_stdout();
 
@@ -70,7 +70,7 @@ TestSuite_Run_Batch_IMP(TestSuite *self, CharBuf *class_name,
     for (uint32_t i = 0; i < size; ++i) {
         TestBatch *batch = (TestBatch*)VA_Fetch(self->batches, i);
 
-        if (CB_Equals(TestBatch_Get_Class_Name(batch), (Obj*)class_name)) {
+        if (Str_Equals(TestBatch_Get_Class_Name(batch), (Obj*)class_name)) {
             TestBatchRunner *runner = TestBatchRunner_new(formatter);
             bool result = TestBatchRunner_Run_Batch(runner, batch);
             DECREF(runner);

http://git-wip-us.apache.org/repos/asf/lucy/blob/2c3dbf15/clownfish/runtime/core/Clownfish/TestHarness/TestSuite.cfh
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/TestHarness/TestSuite.cfh b/clownfish/runtime/core/Clownfish/TestHarness/TestSuite.cfh
index 4f1327a..52bfa2c 100644
--- a/clownfish/runtime/core/Clownfish/TestHarness/TestSuite.cfh
+++ b/clownfish/runtime/core/Clownfish/TestHarness/TestSuite.cfh
@@ -34,7 +34,7 @@ class Clownfish::TestHarness::TestSuite inherits Clownfish::Obj {
     Add_Batch(TestSuite *self, decremented TestBatch *batch);
 
     bool
-    Run_Batch(TestSuite *self, CharBuf *class_name, TestFormatter *formatter);
+    Run_Batch(TestSuite *self, String *class_name, TestFormatter *formatter);
 
     bool
     Run_All_Batches(TestSuite *self, TestFormatter *formatter);

http://git-wip-us.apache.org/repos/asf/lucy/blob/2c3dbf15/clownfish/runtime/core/Clownfish/TestHarness/TestUtils.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/TestHarness/TestUtils.c b/clownfish/runtime/core/Clownfish/TestHarness/TestUtils.c
index 1f2c554..a1fc417 100644
--- a/clownfish/runtime/core/Clownfish/TestHarness/TestUtils.c
+++ b/clownfish/runtime/core/Clownfish/TestHarness/TestUtils.c
@@ -24,7 +24,7 @@
 
 #include "Clownfish/TestHarness/TestUtils.h"
 
-#include "Clownfish/CharBuf.h"
+#include "Clownfish/String.h"
 #include "Clownfish/Util/Memory.h"
 
 uint64_t
@@ -100,18 +100,18 @@ S_random_code_point(void) {
     return code_point;
 }
 
-CharBuf*
+String*
 TestUtils_random_string(size_t length) {
-    CharBuf *string = CB_new(length);
+    String *string = Str_new(length);
     while (length--) {
-        CB_Cat_Char(string, S_random_code_point());
+        Str_Cat_Char(string, S_random_code_point());
     }
     return string;
 }
 
-CharBuf*
+String*
 TestUtils_get_cb(const char *ptr) {
-    return CB_new_from_utf8(ptr, strlen(ptr));
+    return Str_new_from_utf8(ptr, strlen(ptr));
 }
 
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/2c3dbf15/clownfish/runtime/core/Clownfish/TestHarness/TestUtils.cfh
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/TestHarness/TestUtils.cfh b/clownfish/runtime/core/Clownfish/TestHarness/TestUtils.cfh
index b2476e2..3e13439 100644
--- a/clownfish/runtime/core/Clownfish/TestHarness/TestUtils.cfh
+++ b/clownfish/runtime/core/Clownfish/TestHarness/TestUtils.cfh
@@ -18,9 +18,9 @@ parcel Clownfish;
 
 inert class Clownfish::TestHarness::TestUtils  {
 
-    /** Testing-only CharBuf factory which uses strlen().
+    /** Testing-only String factory which uses strlen().
      */
-    inert incremented CharBuf*
+    inert incremented String*
     get_cb(const char *utf8);
 
     /** Return a random unsigned 64-bit integer.
@@ -58,7 +58,7 @@ inert class Clownfish::TestHarness::TestUtils  {
     /** Return a string with a random (legal) sequence of code points.
      * @param length Length of the string in code points.
      */
-    inert incremented CharBuf*
+    inert incremented String*
     random_string(size_t length);
 }
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/2c3dbf15/clownfish/runtime/core/Clownfish/VTable.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/VTable.c b/clownfish/runtime/core/Clownfish/VTable.c
index 244f08f..755506b 100644
--- a/clownfish/runtime/core/Clownfish/VTable.c
+++ b/clownfish/runtime/core/Clownfish/VTable.c
@@ -16,7 +16,7 @@
 
 #define C_CFISH_VTABLE
 #define C_CFISH_OBJ
-#define C_CFISH_CHARBUF
+#define C_CFISH_STRING
 #define C_CFISH_METHOD
 #define CFISH_USE_SHORT_NAMES
 #define CHY_USE_SHORT_NAMES
@@ -29,7 +29,7 @@
 #include <ctype.h>
 
 #include "Clownfish/VTable.h"
-#include "Clownfish/CharBuf.h"
+#include "Clownfish/String.h"
 #include "Clownfish/Err.h"
 #include "Clownfish/Hash.h"
 #include "Clownfish/LockFreeRegistry.h"
@@ -43,7 +43,7 @@ size_t VTable_offset_of_parent = offsetof(VTable, parent);
 
 // Remove spaces and underscores, convert to lower case.
 static void
-S_scrunch_charbuf(CharBuf *source, CharBuf *target);
+S_scrunch_charbuf(String *source, String *target);
 
 static Method*
 S_find_method(VTable *self, const char *meth_name);
@@ -146,12 +146,12 @@ VTable_bootstrap(const VTableSpec *specs, size_t num_specs)
         const VTableSpec *spec = &specs[i];
         VTable *vtable = *spec->vtable;
 
-        vtable->name    = CB_newf("%s", spec->name);
+        vtable->name    = Str_newf("%s", spec->name);
         vtable->methods = VA_new(0);
 
         for (size_t i = 0; i < spec->num_novel_meths; ++i) {
             const NovelMethSpec *mspec = &spec->novel_meth_specs[i];
-            CharBuf *name = CB_newf("%s", mspec->name);
+            String *name = Str_newf("%s", mspec->name);
             Method *method = Method_new(name, mspec->callback_func,
                                         *mspec->offset);
             VA_Push(vtable->methods, (Obj*)method);
@@ -174,7 +174,7 @@ VTable_Clone_IMP(VTable *self) {
 
     memcpy(twin, self, self->vt_alloc_size);
     VTable_Init_Obj(self->vtable, twin); // Set refcount.
-    twin->name = CB_Clone(self->name);
+    twin->name = Str_Clone(self->name);
 
     return twin;
 }
@@ -215,7 +215,7 @@ VTable_Override_IMP(VTable *self, cfish_method_t method, size_t offset) {
     pointer.func_ptr[0] = method;
 }
 
-CharBuf*
+String*
 VTable_Get_Name_IMP(VTable *self) {
     return self->name;
 }
@@ -247,7 +247,7 @@ VTable_init_registry() {
 }
 
 VTable*
-VTable_singleton(const CharBuf *class_name, VTable *parent) {
+VTable_singleton(const String *class_name, VTable *parent) {
     if (VTable_registry == NULL) {
         VTable_init_registry();
     }
@@ -258,7 +258,7 @@ VTable_singleton(const CharBuf *class_name, VTable *parent) {
         uint32_t num_fresh;
 
         if (parent == NULL) {
-            CharBuf *parent_class = VTable_find_parent_class(class_name);
+            String *parent_class = VTable_find_parent_class(class_name);
             if (parent_class == NULL) {
                 THROW(ERR, "Class '%o' doesn't descend from %o", class_name,
                       OBJ->name);
@@ -275,16 +275,16 @@ VTable_singleton(const CharBuf *class_name, VTable *parent) {
         // Turn clone into child.
         singleton->parent = parent;
         DECREF(singleton->name);
-        singleton->name = CB_Clone(class_name);
+        singleton->name = Str_Clone(class_name);
 
         // Allow host methods to override.
         fresh_host_methods = VTable_fresh_host_methods(class_name);
         num_fresh = VA_Get_Size(fresh_host_methods);
         if (num_fresh) {
             Hash *meths = Hash_new(num_fresh);
-            CharBuf *scrunched = CB_new(0);
+            String *scrunched = Str_new(0);
             for (uint32_t i = 0; i < num_fresh; i++) {
-                CharBuf *meth = (CharBuf*)VA_Fetch(fresh_host_methods, i);
+                String *meth = (String*)VA_Fetch(fresh_host_methods, i);
                 S_scrunch_charbuf(meth, scrunched);
                 Hash_Store(meths, (Obj*)scrunched, (Obj*)CFISH_TRUE);
             }
@@ -325,16 +325,16 @@ VTable_singleton(const CharBuf *class_name, VTable *parent) {
 }
 
 static void
-S_scrunch_charbuf(CharBuf *source, CharBuf *target) {
+S_scrunch_charbuf(String *source, String *target) {
     StackString *iterator = SSTR_WRAP(source);
-    CB_Set_Size(target, 0);
+    Str_Set_Size(target, 0);
     while (SStr_Get_Size(iterator)) {
         uint32_t code_point = SStr_Nibble(iterator);
         if (code_point > 127) {
             THROW(ERR, "Can't fold case for %o", source);
         }
         else if (code_point != '_') {
-            CB_Cat_Char(target, tolower(code_point));
+            Str_Cat_Char(target, tolower(code_point));
         }
     }
 }
@@ -348,7 +348,7 @@ VTable_add_to_registry(VTable *vtable) {
         return false;
     }
     else {
-        CharBuf *klass = CB_Clone(vtable->name);
+        String *klass = Str_Clone(vtable->name);
         bool retval
             = LFReg_Register(VTable_registry, (Obj*)klass, (Obj*)vtable);
         DECREF(klass);
@@ -357,7 +357,7 @@ VTable_add_to_registry(VTable *vtable) {
 }
 
 bool
-VTable_add_alias_to_registry(VTable *vtable, CharBuf *alias) {
+VTable_add_alias_to_registry(VTable *vtable, String *alias) {
     if (VTable_registry == NULL) {
         VTable_init_registry();
     }
@@ -365,7 +365,7 @@ VTable_add_alias_to_registry(VTable *vtable, CharBuf *alias) {
         return false;
     }
     else {
-        CharBuf *klass = CB_Clone(alias);
+        String *klass = Str_Clone(alias);
         bool retval
             = LFReg_Register(VTable_registry, (Obj*)klass, (Obj*)vtable);
         DECREF(klass);
@@ -374,7 +374,7 @@ VTable_add_alias_to_registry(VTable *vtable, CharBuf *alias) {
 }
 
 VTable*
-VTable_fetch_vtable(const CharBuf *class_name) {
+VTable_fetch_vtable(const String *class_name) {
     VTable *vtable = NULL;
     if (VTable_registry != NULL) {
         vtable = (VTable*)LFReg_Fetch(VTable_registry, (Obj*)class_name);
@@ -390,7 +390,7 @@ VTable_Add_Host_Method_Alias_IMP(VTable *self, const char *alias,
         fprintf(stderr, "Method %s not found\n", meth_name);
         abort();
     }
-    method->host_alias = CB_newf("%s", alias);
+    method->host_alias = Str_newf("%s", alias);
 }
 
 void
@@ -410,7 +410,7 @@ S_find_method(VTable *self, const char *name) {
 
     for (uint32_t i = 0; i < size; i++) {
         Method *method = (Method*)VA_Fetch(self->methods, i);
-        if (CB_Equals_Str(method->name, name, name_len)) {
+        if (Str_Equals_Str(method->name, name, name_len)) {
             return method;
         }
     }

http://git-wip-us.apache.org/repos/asf/lucy/blob/2c3dbf15/clownfish/runtime/core/Clownfish/VTable.cfh
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/VTable.cfh b/clownfish/runtime/core/Clownfish/VTable.cfh
index b1b0e97..12bbef9 100644
--- a/clownfish/runtime/core/Clownfish/VTable.cfh
+++ b/clownfish/runtime/core/Clownfish/VTable.cfh
@@ -26,7 +26,7 @@ parcel Clownfish;
 class Clownfish::VTable inherits Clownfish::Obj {
 
     VTable            *parent;
-    CharBuf           *name;
+    String            *name;
     uint32_t           flags;
     int32_t            parcel_id;
     size_t             obj_alloc_size;
@@ -49,7 +49,7 @@ class Clownfish::VTable inherits Clownfish::Obj {
      * result.
      */
     inert VTable*
-    singleton(const CharBuf *class_name, VTable *parent);
+    singleton(const String *class_name, VTable *parent);
 
     /** Register a vtable, so that it can be retrieved by class name.
      *
@@ -61,7 +61,7 @@ class Clownfish::VTable inherits Clownfish::Obj {
     add_to_registry(VTable *vtable);
 
     inert bool
-    add_alias_to_registry(VTable *vtable, CharBuf *alias);
+    add_alias_to_registry(VTable *vtable, String *alias);
 
     /** Initialize the registry.
      */
@@ -77,18 +77,18 @@ class Clownfish::VTable inherits Clownfish::Obj {
      * class is not registered.
      */
     inert nullable VTable*
-    fetch_vtable(const CharBuf *class_name);
+    fetch_vtable(const String *class_name);
 
     /** Given a class name, return the name of a parent class which descends
      * from Clownfish::Obj, or NULL if such a class can't be found.
      */
-    inert nullable CharBuf*
-    find_parent_class(const CharBuf *class_name);
+    inert nullable String*
+    find_parent_class(const String *class_name);
 
     /** List all of the methods defined directly within a host subclass.
      */
     inert incremented VArray*
-    fresh_host_methods(const CharBuf *class_name);
+    fresh_host_methods(const String *class_name);
 
     /** Replace a function pointer in the VTable.
      */
@@ -120,7 +120,7 @@ class Clownfish::VTable inherits Clownfish::Obj {
     void
     Exclude_Host_Method(VTable *self, const char *meth_name);
 
-    CharBuf*
+    String*
     Get_Name(VTable *self);
 
     VTable*

http://git-wip-us.apache.org/repos/asf/lucy/blob/2c3dbf15/clownfish/runtime/perl/buildlib/Clownfish/Build/Binding.pm
----------------------------------------------------------------------
diff --git a/clownfish/runtime/perl/buildlib/Clownfish/Build/Binding.pm b/clownfish/runtime/perl/buildlib/Clownfish/Build/Binding.pm
index 419b43b..d731e22 100644
--- a/clownfish/runtime/perl/buildlib/Clownfish/Build/Binding.pm
+++ b/clownfish/runtime/perl/buildlib/Clownfish/Build/Binding.pm
@@ -24,7 +24,7 @@ sub bind_all {
     $class->bind_clownfish;
     $class->bind_test;
     $class->bind_bytebuf;
-    $class->bind_charbuf;
+    $class->bind_string;
     $class->bind_err;
     $class->bind_hash;
     $class->bind_float32;
@@ -93,7 +93,7 @@ bool
 run_tests(package)
     char *package;
 CODE:
-    cfish_CharBuf *class_name = cfish_CB_newf("%s", package);
+    cfish_String *class_name = cfish_Str_newf("%s", package);
     cfish_TestFormatter *formatter
         = (cfish_TestFormatter*)cfish_TestFormatterTAP_new();
     cfish_TestSuite *suite = testcfish_Test_create_test_suite();
@@ -145,9 +145,9 @@ END_XS_CODE
     Clownfish::CFC::Binding::Perl::Class->register($binding);
 }
 
-sub bind_charbuf {
+sub bind_string {
     my $xs_code = <<'END_XS_CODE';
-MODULE = Clownfish     PACKAGE = Clownfish::CharBuf
+MODULE = Clownfish     PACKAGE = Clownfish::String
 
 SV*
 new(either_sv, sv)
@@ -157,23 +157,23 @@ CODE:
 {
     STRLEN size;
     char *ptr = SvPVutf8(sv, size);
-    cfish_CharBuf *self = (cfish_CharBuf*)XSBind_new_blank_obj(either_sv);
-    cfish_CB_init(self, size);
-    CFISH_CB_Cat_Trusted_Str(self, ptr, size);
+    cfish_String *self = (cfish_String*)XSBind_new_blank_obj(either_sv);
+    cfish_Str_init(self, size);
+    CFISH_Str_Cat_Trusted_Str(self, ptr, size);
     RETVAL = CFISH_OBJ_TO_SV_NOINC(self);
 }
 OUTPUT: RETVAL
 
 SV*
 _clone(self)
-    cfish_CharBuf *self;
+    cfish_String *self;
 CODE:
-    RETVAL = CFISH_OBJ_TO_SV_NOINC(CFISH_CB_Clone_IMP(self));
+    RETVAL = CFISH_OBJ_TO_SV_NOINC(CFISH_Str_Clone_IMP(self));
 OUTPUT: RETVAL
 
 SV*
 to_perl(self)
-    cfish_CharBuf *self;
+    cfish_String *self;
 CODE:
     RETVAL = XSBind_cb_to_sv(self);
 OUTPUT: RETVAL
@@ -198,7 +198,7 @@ END_XS_CODE
 
     my $binding = Clownfish::CFC::Binding::Perl::Class->new(
         parcel     => "Clownfish",
-        class_name => "Clownfish::CharBuf",
+        class_name => "Clownfish::String",
     );
     $binding->append_xs($xs_code);
     $binding->exclude_constructor;
@@ -266,7 +266,7 @@ MODULE = Clownfish    PACKAGE = Clownfish::Hash
 SV*
 _fetch(self, key)
     cfish_Hash *self;
-    const cfish_CharBuf *key;
+    const cfish_String *key;
 CODE:
     RETVAL = CFISH_OBJ_TO_SV(CFISH_Hash_Fetch_IMP(self, (cfish_Obj*)key));
 OUTPUT: RETVAL
@@ -274,7 +274,7 @@ OUTPUT: RETVAL
 void
 store(self, key, value);
     cfish_Hash          *self;
-    const cfish_CharBuf *key;
+    const cfish_String *key;
     cfish_Obj           *value;
 PPCODE:
 {
@@ -472,7 +472,7 @@ MODULE = Clownfish     PACKAGE = Clownfish::Obj
 bool
 is_a(self, class_name)
     cfish_Obj *self;
-    const cfish_CharBuf *class_name;
+    const cfish_String *class_name;
 CODE:
 {
     cfish_VTable *target = cfish_VTable_fetch_vtable(class_name);
@@ -597,7 +597,7 @@ CODE:
     char *ptr = SvPVutf8(class_name_sv, size);
     cfish_StackString *class_name = CFISH_SStr_WRAP_STR(ptr, size);
     cfish_VTable *vtable
-        = cfish_VTable_fetch_vtable((cfish_CharBuf*)class_name);
+        = cfish_VTable_fetch_vtable((cfish_String*)class_name);
     RETVAL = vtable ? (SV*)CFISH_VTable_To_Host(vtable) : &PL_sv_undef;
 }
 OUTPUT: RETVAL
@@ -608,12 +608,12 @@ singleton(unused_sv, ...)
 CODE:
 {
     CFISH_UNUSED_VAR(unused_sv);
-    cfish_CharBuf *class_name = NULL;
+    cfish_String *class_name = NULL;
     cfish_VTable  *parent     = NULL;
     bool args_ok
         = XSBind_allot_params(&(ST(0)), 1, items,
                               ALLOT_OBJ(&class_name, "class_name", 10, true,
-                                        CFISH_CHARBUF, alloca(cfish_SStr_size())),
+                                        CFISH_STRING, alloca(cfish_SStr_size())),
                               ALLOT_OBJ(&parent, "parent", 6, false,
                                         CFISH_VTABLE, NULL),
                               NULL);

http://git-wip-us.apache.org/repos/asf/lucy/blob/2c3dbf15/clownfish/runtime/perl/lib/Clownfish.pm
----------------------------------------------------------------------
diff --git a/clownfish/runtime/perl/lib/Clownfish.pm b/clownfish/runtime/perl/lib/Clownfish.pm
index b416887..7a4f961 100644
--- a/clownfish/runtime/perl/lib/Clownfish.pm
+++ b/clownfish/runtime/perl/lib/Clownfish.pm
@@ -111,7 +111,7 @@ sub error {$Clownfish::Err::error}
         while ( my ( $symbol, $glob ) = each %$stash ) {
             next if ref $glob;
             next unless *$glob{CODE};
-            $methods->push( Clownfish::CharBuf->new($symbol) );
+            $methods->push( Clownfish::String->new($symbol) );
         }
         return $methods;
     }
@@ -147,15 +147,15 @@ sub error {$Clownfish::Err::error}
 }
 
 {
-    package Clownfish::CharBuf;
+    package Clownfish::String;
     our $VERSION = '0.003000';
     $VERSION = eval $VERSION;
 
     {
         # Defeat obscure bugs in the XS auto-generation by redefining clone().
-        # (Because of how the typemap works for CharBuf*,
+        # (Because of how the typemap works for String*,
         # the auto-generated methods return UTF-8 Perl scalars rather than
-        # actual CharBuf objects.)
+        # actual String objects.)
         no warnings 'redefine';
         sub clone { shift->_clone(@_) }
     }
@@ -194,7 +194,7 @@ sub error {$Clownfish::Err::error}
         my ( $either, $message ) = @_;
         my ( undef, $file, $line ) = caller;
         $message .= ", $file line $line\n";
-        return $either->_new( mess => Clownfish::CharBuf->new($message) );
+        return $either->_new( mess => Clownfish::String->new($message) );
     }
 
     sub do_throw {

http://git-wip-us.apache.org/repos/asf/lucy/blob/2c3dbf15/clownfish/runtime/perl/lib/Clownfish/CharBuf.pm
----------------------------------------------------------------------
diff --git a/clownfish/runtime/perl/lib/Clownfish/CharBuf.pm b/clownfish/runtime/perl/lib/Clownfish/CharBuf.pm
index 09ac4d7..a6458c8 100644
--- a/clownfish/runtime/perl/lib/Clownfish/CharBuf.pm
+++ b/clownfish/runtime/perl/lib/Clownfish/CharBuf.pm
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-package Clownfish::CharBuf;
+package Clownfish::String;
 use Clownfish;
 our $VERSION = '0.003000';
 $VERSION = eval $VERSION;

http://git-wip-us.apache.org/repos/asf/lucy/blob/2c3dbf15/clownfish/runtime/perl/t/021-vtable.t
----------------------------------------------------------------------
diff --git a/clownfish/runtime/perl/t/021-vtable.t b/clownfish/runtime/perl/t/021-vtable.t
index bf982fa..d2e0c14 100644
--- a/clownfish/runtime/perl/t/021-vtable.t
+++ b/clownfish/runtime/perl/t/021-vtable.t
@@ -46,7 +46,7 @@ isa_ok( $resurrected, "MyHash", "subclass name survived Perl destruction" );
 is( $resurrected->to_string, $stringified,
     "It's the same Hash from earlier (though a different Perl object)" );
 
-my $booga = Clownfish::CharBuf->new("booga");
+my $booga = Clownfish::String->new("booga");
 $resurrected->store( "ooga", $booga );
 
 is( $resurrected->fetch("ooga"),

http://git-wip-us.apache.org/repos/asf/lucy/blob/2c3dbf15/clownfish/runtime/perl/t/binding/016-varray.t
----------------------------------------------------------------------
diff --git a/clownfish/runtime/perl/t/binding/016-varray.t b/clownfish/runtime/perl/t/binding/016-varray.t
index 3638716..4397cf5 100644
--- a/clownfish/runtime/perl/t/binding/016-varray.t
+++ b/clownfish/runtime/perl/t/binding/016-varray.t
@@ -22,7 +22,7 @@ use Clownfish;
 my ( $varray, $twin );
 
 $varray = Clownfish::VArray->new;
-$varray->push( Clownfish::CharBuf->new($_) ) for 1 .. 5;
+$varray->push( Clownfish::String->new($_) ) for 1 .. 5;
 $varray->delete(3);
 $twin = $varray->_clone;
 is_deeply( $twin->to_perl, $varray->to_perl, "clone" );

http://git-wip-us.apache.org/repos/asf/lucy/blob/2c3dbf15/clownfish/runtime/perl/t/binding/017-hash.t
----------------------------------------------------------------------
diff --git a/clownfish/runtime/perl/t/binding/017-hash.t b/clownfish/runtime/perl/t/binding/017-hash.t
index 7ae3e7d..1843198 100644
--- a/clownfish/runtime/perl/t/binding/017-hash.t
+++ b/clownfish/runtime/perl/t/binding/017-hash.t
@@ -20,8 +20,8 @@ use Test::More tests => 2;
 use Clownfish qw( to_perl to_clownfish );
 
 my $hash = Clownfish::Hash->new( capacity => 10 );
-$hash->store( "foo", Clownfish::CharBuf->new("bar") );
-$hash->store( "baz", Clownfish::CharBuf->new("banana") );
+$hash->store( "foo", Clownfish::String->new("bar") );
+$hash->store( "baz", Clownfish::String->new("banana") );
 
 ok( !defined( $hash->fetch("blah") ),
     "fetch for a non-existent key returns undef" );

http://git-wip-us.apache.org/repos/asf/lucy/blob/2c3dbf15/clownfish/runtime/perl/t/binding/029-charbuf.t
----------------------------------------------------------------------
diff --git a/clownfish/runtime/perl/t/binding/029-charbuf.t b/clownfish/runtime/perl/t/binding/029-charbuf.t
index 7ce1026..23924a5 100644
--- a/clownfish/runtime/perl/t/binding/029-charbuf.t
+++ b/clownfish/runtime/perl/t/binding/029-charbuf.t
@@ -33,11 +33,11 @@ sub utf8_test_strings {
 
 my ( $smiley, $not_a_smiley, $frowny ) = utf8_test_strings();
 
-my $charbuf = Clownfish::CharBuf->new($smiley);
-isa_ok( $charbuf, "Clownfish::CharBuf" );
+my $charbuf = Clownfish::String->new($smiley);
+isa_ok( $charbuf, "Clownfish::String" );
 is( $charbuf->to_perl, $smiley, "round trip UTF-8" );
 
-$charbuf = Clownfish::CharBuf->new($smiley);
+$charbuf = Clownfish::String->new($smiley);
 my $clone = $charbuf->clone;
-is( $clone->to_perl, Clownfish::CharBuf->new($smiley)->to_perl, "clone" );
+is( $clone->to_perl, Clownfish::String->new($smiley)->to_perl, "clone" );
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/2c3dbf15/clownfish/runtime/perl/t/binding/038-lock_free_registry.t
----------------------------------------------------------------------
diff --git a/clownfish/runtime/perl/t/binding/038-lock_free_registry.t b/clownfish/runtime/perl/t/binding/038-lock_free_registry.t
index 420dd58..0c9f60a 100644
--- a/clownfish/runtime/perl/t/binding/038-lock_free_registry.t
+++ b/clownfish/runtime/perl/t/binding/038-lock_free_registry.t
@@ -50,7 +50,7 @@ sub register_many {
 
     my $succeeded = 0;
     for my $number (@$nums) {
-        my $obj = Clownfish::CharBuf->new($number);
+        my $obj = Clownfish::String->new($number);
         $succeeded += $registry->register( key => $obj, value => $obj );
     }
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/2c3dbf15/clownfish/runtime/perl/xs/XSBind.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/perl/xs/XSBind.c b/clownfish/runtime/perl/xs/XSBind.c
index a1d3451..f8dbcc1 100644
--- a/clownfish/runtime/perl/xs/XSBind.c
+++ b/clownfish/runtime/perl/xs/XSBind.c
@@ -65,7 +65,7 @@ XSBind_new_blank_obj(SV *either_sv) {
         STRLEN len;
         char *ptr = SvPVutf8(either_sv, len);
         cfish_StackString *klass = CFISH_SStr_WRAP_STR(ptr, len);
-        vtable = cfish_VTable_singleton((cfish_CharBuf*)klass, NULL);
+        vtable = cfish_VTable_singleton((cfish_String*)klass, NULL);
     }
 
     // Use the VTable to allocate a new blank object of the right size.
@@ -86,7 +86,7 @@ XSBind_maybe_sv_to_cfish_obj(SV *sv, cfish_VTable *vtable, void *allocation) {
     cfish_Obj *retval = NULL;
     if (XSBind_sv_defined(sv)) {
         if (sv_isobject(sv)
-            && sv_derived_from(sv, (char*)CFISH_CB_Get_Ptr8(CFISH_VTable_Get_Name(vtable)))
+            && sv_derived_from(sv, (char*)CFISH_Str_Get_Ptr8(CFISH_VTable_Get_Name(vtable)))
            ) {
             // Unwrap a real Clownfish object.
             IV tmp = SvIV(SvRV(sv));
@@ -95,7 +95,7 @@ XSBind_maybe_sv_to_cfish_obj(SV *sv, cfish_VTable *vtable, void *allocation) {
         else if (allocation &&
                  (vtable == CFISH_STACKSTRING
                   || vtable == CFISH_VIEWCHARBUF
-                  || vtable == CFISH_CHARBUF
+                  || vtable == CFISH_STRING
                   || vtable == CFISH_OBJ)
                 ) {
             // Wrap the string from an ordinary Perl scalar inside a
@@ -134,8 +134,8 @@ XSBind_cfish_to_perl(cfish_Obj *obj) {
     if (obj == NULL) {
         return newSV(0);
     }
-    else if (CFISH_Obj_Is_A(obj, CFISH_CHARBUF)) {
-        return XSBind_cb_to_sv((cfish_CharBuf*)obj);
+    else if (CFISH_Obj_Is_A(obj, CFISH_STRING)) {
+        return XSBind_cb_to_sv((cfish_String*)obj);
     }
     else if (CFISH_Obj_Is_A(obj, CFISH_BYTEBUF)) {
         return XSBind_bb_to_sv((cfish_ByteBuf*)obj);
@@ -200,7 +200,7 @@ XSBind_perl_to_cfish(SV *sv) {
         if (!retval) {
             STRLEN len;
             char *ptr = SvPVutf8(sv, len);
-            retval = (cfish_Obj*)cfish_CB_new_from_trusted_utf8(ptr, len);
+            retval = (cfish_Obj*)cfish_Str_new_from_trusted_utf8(ptr, len);
         }
     }
     else if (sv) {
@@ -224,12 +224,12 @@ XSBind_bb_to_sv(const cfish_ByteBuf *bb) {
 }
 
 SV*
-XSBind_cb_to_sv(const cfish_CharBuf *cb) {
+XSBind_cb_to_sv(const cfish_String *cb) {
     if (!cb) {
         return newSV(0);
     }
     else {
-        SV *sv = newSVpvn((char*)CFISH_CB_Get_Ptr8(cb), CFISH_CB_Get_Size(cb));
+        SV *sv = newSVpvn((char*)CFISH_Str_Get_Ptr8(cb), CFISH_Str_Get_Size(cb));
         SvUTF8_on(sv);
         return sv;
     }
@@ -328,7 +328,7 @@ static SV*
 S_cfish_hash_to_perl_hash(cfish_Hash *hash) {
     HV *perl_hash = newHV();
     SV *key_sv    = newSV(1);
-    cfish_CharBuf *key;
+    cfish_String *key;
     cfish_Obj     *val;
 
     // Prepare the SV key.
@@ -340,15 +340,15 @@ S_cfish_hash_to_perl_hash(cfish_Hash *hash) {
     while (CFISH_Hash_Next(hash, (cfish_Obj**)&key, &val)) {
         // Recurse for each value.
         SV *val_sv = XSBind_cfish_to_perl(val);
-        if (!CFISH_Obj_Is_A((cfish_Obj*)key, CFISH_CHARBUF)) {
+        if (!CFISH_Obj_Is_A((cfish_Obj*)key, CFISH_STRING)) {
             CFISH_THROW(CFISH_ERR,
                         "Can't convert a key of class %o to a Perl hash key",
                         CFISH_Obj_Get_Class_Name((cfish_Obj*)key));
         }
         else {
-            STRLEN key_size = CFISH_CB_Get_Size(key);
+            STRLEN key_size = CFISH_Str_Get_Size(key);
             char *key_sv_ptr = SvGROW(key_sv, key_size + 1);
-            memcpy(key_sv_ptr, CFISH_CB_Get_Ptr8(key), key_size);
+            memcpy(key_sv_ptr, CFISH_Str_Get_Ptr8(key), key_size);
             SvCUR_set(key_sv, key_size);
             *SvEND(key_sv) = '\0';
             (void)hv_store_ent(perl_hash, key_sv, val_sv, 0);
@@ -471,7 +471,7 @@ S_extract_from_sv(SV *value, void *target, const char *label,
                         valid_assignment = true;
                     }
                     else {
-                        cfish_CharBuf *mess
+                        cfish_String *mess
                             = CFISH_MAKE_MESS(
                                   "Invalid value for '%s' - not a %o",
                                   label, CFISH_VTable_Get_Name(vtable));
@@ -485,7 +485,7 @@ S_extract_from_sv(SV *value, void *target, const char *label,
                 valid_assignment = true;
                 break;
             default: {
-                    cfish_CharBuf *mess
+                    cfish_String *mess
                         = CFISH_MAKE_MESS("Unrecognized type: %i32 for param '%s'",
                                           (int32_t)type, label);
                     cfish_Err_set_error(cfish_Err_new(mess));
@@ -497,7 +497,7 @@ S_extract_from_sv(SV *value, void *target, const char *label,
     // Enforce that required params cannot be undef and must present valid
     // values.
     if (required && !valid_assignment) {
-        cfish_CharBuf *mess = CFISH_MAKE_MESS("Missing required param %s",
+        cfish_String *mess = CFISH_MAKE_MESS("Missing required param %s",
                                               label);
         cfish_Err_set_error(cfish_Err_new(mess));
         return false;
@@ -516,7 +516,7 @@ XSBind_allot_params(SV** stack, int32_t start, int32_t num_stack_elems, ...) {
     // Verify that our args come in pairs. Return success if there are no
     // args.
     if ((num_stack_elems - start) % 2 != 0) {
-        cfish_CharBuf *mess
+        cfish_String *mess
             = CFISH_MAKE_MESS(
                   "Expecting hash-style params, got odd number of args");
         cfish_Err_set_error(cfish_Err_new(mess));
@@ -551,7 +551,7 @@ XSBind_allot_params(SV** stack, int32_t start, int32_t num_stack_elems, ...) {
         if (found_arg == -1) {
             // Didn't find this parameter. Throw an error if it was required.
             if (required) {
-                cfish_CharBuf *mess
+                cfish_String *mess
                     = CFISH_MAKE_MESS("Missing required parameter: '%s'",
                                       label);
                 cfish_Err_set_error(cfish_Err_new(mess));
@@ -577,7 +577,7 @@ XSBind_allot_params(SV** stack, int32_t start, int32_t num_stack_elems, ...) {
         if (!cfish_NumUtil_u1get(verified_labels, tick)) {
             SV *const key_sv = stack[tick];
             char *key = SvPV_nolen(key_sv);
-            cfish_CharBuf *mess
+            cfish_String *mess
                 = CFISH_MAKE_MESS("Invalid parameter: '%s'", key);
             cfish_Err_set_error(cfish_Err_new(mess));
             return false;
@@ -605,9 +605,9 @@ S_lazy_init_host_obj(cfish_Obj *self) {
     sv_setiv(inner_obj, PTR2IV(self));
 
     // Connect class association.
-    cfish_CharBuf *class_name = CFISH_VTable_Get_Name(self->vtable);
-    HV *stash = gv_stashpvn((char*)CFISH_CB_Get_Ptr8(class_name),
-                            CFISH_CB_Get_Size(class_name), TRUE);
+    cfish_String *class_name = CFISH_VTable_Get_Name(self->vtable);
+    HV *stash = gv_stashpvn((char*)CFISH_Str_Get_Ptr8(class_name),
+                            CFISH_Str_Get_Size(class_name), TRUE);
     SvSTASH_set(inner_obj, (HV*)SvREFCNT_inc(stash));
 
     /* Up till now we've been keeping track of the refcount in
@@ -719,7 +719,7 @@ cfish_VTable_register_with_host(cfish_VTable *singleton, cfish_VTable *parent) {
 }
 
 cfish_VArray*
-cfish_VTable_fresh_host_methods(const cfish_CharBuf *class_name) {
+cfish_VTable_fresh_host_methods(const cfish_String *class_name) {
     dSP;
     ENTER;
     SAVETMPS;
@@ -736,8 +736,8 @@ cfish_VTable_fresh_host_methods(const cfish_CharBuf *class_name) {
     return methods;
 }
 
-cfish_CharBuf*
-cfish_VTable_find_parent_class(const cfish_CharBuf *class_name) {
+cfish_String*
+cfish_VTable_find_parent_class(const cfish_String *class_name) {
     dSP;
     ENTER;
     SAVETMPS;
@@ -749,8 +749,8 @@ cfish_VTable_find_parent_class(const cfish_CharBuf *class_name) {
     SPAGAIN;
     SV *parent_class_sv = POPs;
     PUTBACK;
-    cfish_CharBuf *parent_class
-        = (cfish_CharBuf*)XSBind_perl_to_cfish(parent_class_sv);
+    cfish_String *parent_class
+        = (cfish_String*)XSBind_perl_to_cfish(parent_class_sv);
     FREETMPS;
     LEAVE;
     return parent_class;
@@ -857,16 +857,16 @@ CFISH_Err_To_Host_IMP(cfish_Err *self) {
 }
 
 void
-cfish_Err_throw_mess(cfish_VTable *vtable, cfish_CharBuf *message) {
+cfish_Err_throw_mess(cfish_VTable *vtable, cfish_String *message) {
     cfish_Err *err = (cfish_Err*)CFISH_VTable_Make_Obj(vtable);
-    cfish_Err_init(err, cfish_CB_new(0));
+    cfish_Err_init(err, cfish_Str_new(0));
     CFISH_Err_Cat_Mess(err, message);
     CFISH_DECREF(message);
     cfish_Err_do_throw(err);
 }
 
 void
-cfish_Err_warn_mess(cfish_CharBuf *message) {
+cfish_Err_warn_mess(cfish_String *message) {
     SV *error_sv = XSBind_cb_to_sv(message);
     CFISH_DECREF(message);
     warn("%s", SvPV_nolen(error_sv));
@@ -889,8 +889,8 @@ cfish_Err_trap(CFISH_Err_Attempt_t routine, void *context) {
 
     int count = call_sv(attempt_xsub, G_EVAL | G_DISCARD);
     if (count != 0) {
-        cfish_CharBuf *mess
-            = cfish_CB_newf("'attempt' returned too many values: %i32",
+        cfish_String *mess
+            = cfish_Str_newf("'attempt' returned too many values: %i32",
                            (int32_t)count);
         error = cfish_Err_new(mess);
     }
@@ -907,7 +907,7 @@ cfish_Err_trap(CFISH_Err_Attempt_t routine, void *context) {
             else {
                 STRLEN len;
                 char *ptr = SvPVutf8(dollar_at, len);
-                cfish_CharBuf *mess = cfish_CB_new_from_trusted_utf8(ptr, len);
+                cfish_String *mess = cfish_Str_new_from_trusted_utf8(ptr, len);
                 error = cfish_Err_new(mess);
             }
         }

http://git-wip-us.apache.org/repos/asf/lucy/blob/2c3dbf15/clownfish/runtime/perl/xs/XSBind.h
----------------------------------------------------------------------
diff --git a/clownfish/runtime/perl/xs/XSBind.h b/clownfish/runtime/perl/xs/XSBind.h
index 63d9f15..8b485fd 100644
--- a/clownfish/runtime/perl/xs/XSBind.h
+++ b/clownfish/runtime/perl/xs/XSBind.h
@@ -22,7 +22,7 @@
 
 #include "Clownfish/Obj.h"
 #include "Clownfish/ByteBuf.h"
-#include "Clownfish/CharBuf.h"
+#include "Clownfish/String.h"
 #include "Clownfish/Err.h"
 #include "Clownfish/Hash.h"
 #include "Clownfish/Num.h"
@@ -111,7 +111,7 @@ cfish_XSBind_cfish_obj_to_sv_noinc(cfish_Obj *obj) {
 #define CFISH_OBJ_TO_SV_NOINC(_obj) \
     cfish_XSBind_cfish_obj_to_sv_noinc((cfish_Obj*)_obj)
 
-/** Deep conversion of Clownfish objects to Perl objects -- CharBufs to UTF-8
+/** Deep conversion of Clownfish objects to Perl objects -- Strings to UTF-8
  * SVs, ByteBufs to SVs, VArrays to Perl array refs, Hashes to Perl hashrefs,
  * and any other object to a Perl object wrapping the Clownfish Obj.
  */
@@ -120,7 +120,7 @@ cfish_XSBind_cfish_to_perl(cfish_Obj *obj);
 
 /** Deep conversion of Perl data structures to Clownfish objects -- Perl hash
  * to Hash, Perl array to VArray, Clownfish objects stripped of their
- * wrappers, and everything else stringified and turned to a CharBuf.
+ * wrappers, and everything else stringified and turned to a String.
  */
 CFISH_VISIBLE cfish_Obj*
 cfish_XSBind_perl_to_cfish(SV *sv);
@@ -130,10 +130,10 @@ cfish_XSBind_perl_to_cfish(SV *sv);
 CFISH_VISIBLE SV*
 cfish_XSBind_bb_to_sv(const cfish_ByteBuf *bb);
 
-/** Convert a CharBuf into a new UTF-8 string SV.
+/** Convert a String into a new UTF-8 string SV.
  */
 CFISH_VISIBLE SV*
-cfish_XSBind_cb_to_sv(const cfish_CharBuf *cb);
+cfish_XSBind_cb_to_sv(const cfish_String *cb);
 
 /** Perl-specific wrapper for Err#trap.  The "routine" must be either a
  * subroutine reference or the name of a subroutine.
@@ -150,8 +150,8 @@ cfish_XSBind_enable_overload(void *pobj);
  * a NULL-terminated series of ALLOT_ macros.
  *
  *     cfish_XSBind_allot_params(stack, start, num_stack_elems,
- *          ALLOT_OBJ(&field, "field", 5, CFISH_CHARBUF, true, alloca(cfish_SStr_size()),
- *          ALLOT_OBJ(&term, "term", 4, CFISH_CHARBUF, true, alloca(cfish_SStr_size()),
+ *          ALLOT_OBJ(&field, "field", 5, CFISH_STRING, true, alloca(cfish_SStr_size()),
+ *          ALLOT_OBJ(&term, "term", 4, CFISH_STRING, true, alloca(cfish_SStr_size()),
  *          NULL);
  *
  * The following ALLOT_ macros are available for primitive types:

http://git-wip-us.apache.org/repos/asf/lucy/blob/2c3dbf15/clownfish/runtime/ruby/ext/Bind.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/ruby/ext/Bind.c b/clownfish/runtime/ruby/ext/Bind.c
index ec11e7e..199bba5 100644
--- a/clownfish/runtime/ruby/ext/Bind.c
+++ b/clownfish/runtime/ruby/ext/Bind.c
@@ -21,8 +21,8 @@
 
 VALUE
 Bind_cfish_to_ruby(cfish_Obj *obj) {
-  if (CFISH_Obj_Is_A(obj, CFISH_CHARBUF)) {
-      return Bind_cb_to_ruby((cfish_CharBuf*)obj);
+  if (CFISH_Obj_Is_A(obj, CFISH_STRING)) {
+      return Bind_cb_to_ruby((cfish_String*)obj);
   }
   else if (CFISH_Obj_Is_A(obj, CFISH_VARRAY)) {
       return S_cfish_array_to_ruby_array((cfish_VArray*)obj);
@@ -30,12 +30,12 @@ Bind_cfish_to_ruby(cfish_Obj *obj) {
 }
 
 VALUE
-Bind_cb_to_ruby(const cfish_CharBuf *cb) {
+Bind_cb_to_ruby(const cfish_String *cb) {
     if (!cb) {
         return rb_str_new2("");
     }
     else {
-        return rb_str_new((char*)CFISH_CB_Get_Ptr8(cb), CFISH_CB_Get_Size(cb));
+        return rb_str_new((char*)CFISH_Str_Get_Ptr8(cb), CFISH_Str_Get_Size(cb));
     }
 }
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/2c3dbf15/clownfish/runtime/ruby/ext/Bind.h
----------------------------------------------------------------------
diff --git a/clownfish/runtime/ruby/ext/Bind.h b/clownfish/runtime/ruby/ext/Bind.h
index ee7a05a..c7740a2 100644
--- a/clownfish/runtime/ruby/ext/Bind.h
+++ b/clownfish/runtime/ruby/ext/Bind.h
@@ -27,7 +27,7 @@ extern "C" {
 #include "ruby.h"
 #include "Clownfish/Obj.h"
 #include "Clownfish/ByteBuf.h"
-#include "Clownfish/CharBuf.h"
+#include "Clownfish/String.h"
 #include "Clownfish/Err.h"
 #include "Clownfish/Hash.h"
 #include "Clownfish/Num.h"
@@ -35,7 +35,7 @@ extern "C" {
 #include "Clownfish/VTable.h"
 
 VALUE Bind_cfish_to_ruby(cfish_Obj *obj);
-VALUE Bind_cb_to_ruby(const cfish_CharBuf *cb);
+VALUE Bind_cb_to_ruby(const cfish_String *cb);
 static VALUE S_cfish_array_to_ruby_array(cfish_VArray *varray);
 
 #ifdef __cplusplus

http://git-wip-us.apache.org/repos/asf/lucy/blob/2c3dbf15/clownfish/runtime/ruby/ext/Clownfish.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/ruby/ext/Clownfish.c b/clownfish/runtime/ruby/ext/Clownfish.c
index 64b011c..72a703b 100644
--- a/clownfish/runtime/ruby/ext/Clownfish.c
+++ b/clownfish/runtime/ruby/ext/Clownfish.c
@@ -19,7 +19,7 @@
 #include "Clownfish/Host.h"
 #include "Clownfish/Util/Memory.h"
 #include "Clownfish/Util/StringHelper.h"
-#include "Clownfish/CharBuf.h"
+#include "Clownfish/String.h"
 #include "Clownfish/Test/TestCharBuf.h"
 #include "Clownfish/Test.h"
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/2c3dbf15/core/Lucy/Analysis/Analyzer.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Analysis/Analyzer.c b/core/Lucy/Analysis/Analyzer.c
index 3115d6b..b620e9e 100644
--- a/core/Lucy/Analysis/Analyzer.c
+++ b/core/Lucy/Analysis/Analyzer.c
@@ -29,9 +29,9 @@ Analyzer_init(Analyzer *self) {
 }
 
 Inversion*
-Analyzer_Transform_Text_IMP(Analyzer *self, CharBuf *text) {
-    size_t token_len = CB_Get_Size(text);
-    Token *seed = Token_new((char*)CB_Get_Ptr8(text), token_len, 0,
+Analyzer_Transform_Text_IMP(Analyzer *self, String *text) {
+    size_t token_len = Str_Get_Size(text);
+    Token *seed = Token_new((char*)Str_Get_Ptr8(text), token_len, 0,
                             token_len, 1.0, 1);
     Inversion *starter = Inversion_new(seed);
     Inversion *retval  = Analyzer_Transform(self, starter);
@@ -41,15 +41,15 @@ Analyzer_Transform_Text_IMP(Analyzer *self, CharBuf *text) {
 }
 
 VArray*
-Analyzer_Split_IMP(Analyzer *self, CharBuf *text) {
+Analyzer_Split_IMP(Analyzer *self, String *text) {
     Inversion  *inversion = Analyzer_Transform_Text(self, text);
     VArray     *out       = VA_new(0);
     Token      *token;
 
     while ((token = Inversion_Next(inversion)) != NULL) {
         TokenIVARS *const token_ivars = Token_IVARS(token);
-        CharBuf *string
-            = CB_new_from_trusted_utf8(token_ivars->text, token_ivars->len);
+        String *string
+            = Str_new_from_trusted_utf8(token_ivars->text, token_ivars->len);
         VA_Push(out, (Obj*)string);
     }
 
@@ -62,7 +62,7 @@ Obj*
 Analyzer_Dump_IMP(Analyzer *self) {
     Hash *dump = Hash_new(0);
     Hash_Store_Str(dump, "_class", 6,
-                   (Obj*)CB_Clone(Obj_Get_Class_Name((Obj*)self)));
+                   (Obj*)Str_Clone(Obj_Get_Class_Name((Obj*)self)));
     return (Obj*)dump;
 }
 
@@ -70,8 +70,8 @@ Obj*
 Analyzer_Load_IMP(Analyzer *self, Obj *dump) {
     CHY_UNUSED_VAR(self);
     Hash *source = (Hash*)CERTIFY(dump, HASH);
-    CharBuf *class_name
-        = (CharBuf*)CERTIFY(Hash_Fetch_Str(source, "_class", 6), CHARBUF);
+    String *class_name
+        = (String*)CERTIFY(Hash_Fetch_Str(source, "_class", 6), STRING);
     VTable *vtable = VTable_singleton(class_name, NULL);
     Analyzer *loaded = (Analyzer*)VTable_Make_Obj(vtable);
     return (Obj*)loaded;

http://git-wip-us.apache.org/repos/asf/lucy/blob/2c3dbf15/core/Lucy/Analysis/Analyzer.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Analysis/Analyzer.cfh b/core/Lucy/Analysis/Analyzer.cfh
index 7d01ddc..486ebc2 100644
--- a/core/Lucy/Analysis/Analyzer.cfh
+++ b/core/Lucy/Analysis/Analyzer.cfh
@@ -42,12 +42,12 @@ public abstract class Lucy::Analysis::Analyzer inherits Clownfish::Obj {
      * provide an optimized implementation which minimizes string copies.
      */
     public incremented Inversion*
-    Transform_Text(Analyzer *self, CharBuf *text);
+    Transform_Text(Analyzer *self, String *text);
 
     /** Analyze text and return an array of token texts.
      */
     public incremented VArray*
-    Split(Analyzer *self, CharBuf *text);
+    Split(Analyzer *self, String *text);
 
     public incremented Obj*
     Dump(Analyzer *self);

http://git-wip-us.apache.org/repos/asf/lucy/blob/2c3dbf15/core/Lucy/Analysis/CaseFolder.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Analysis/CaseFolder.c b/core/Lucy/Analysis/CaseFolder.c
index 643cb8f..7003dd9 100644
--- a/core/Lucy/Analysis/CaseFolder.c
+++ b/core/Lucy/Analysis/CaseFolder.c
@@ -49,7 +49,7 @@ CaseFolder_Transform_IMP(CaseFolder *self, Inversion *inversion) {
 }
 
 Inversion*
-CaseFolder_Transform_Text_IMP(CaseFolder *self, CharBuf *text) {
+CaseFolder_Transform_Text_IMP(CaseFolder *self, String *text) {
     CaseFolderIVARS *const ivars = CaseFolder_IVARS(self);
     return Normalizer_Transform_Text(ivars->normalizer, text);
 }

http://git-wip-us.apache.org/repos/asf/lucy/blob/2c3dbf15/core/Lucy/Analysis/CaseFolder.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Analysis/CaseFolder.cfh b/core/Lucy/Analysis/CaseFolder.cfh
index a173e9d..cce788b 100644
--- a/core/Lucy/Analysis/CaseFolder.cfh
+++ b/core/Lucy/Analysis/CaseFolder.cfh
@@ -41,7 +41,7 @@ public class Lucy::Analysis::CaseFolder inherits Lucy::Analysis::Analyzer {
     Transform(CaseFolder *self, Inversion *inversion);
 
     public incremented Inversion*
-    Transform_Text(CaseFolder *self, CharBuf *text);
+    Transform_Text(CaseFolder *self, String *text);
 
     public bool
     Equals(CaseFolder *self, Obj *other);

http://git-wip-us.apache.org/repos/asf/lucy/blob/2c3dbf15/core/Lucy/Analysis/EasyAnalyzer.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Analysis/EasyAnalyzer.c b/core/Lucy/Analysis/EasyAnalyzer.c
index 4604c82..f4d0947 100644
--- a/core/Lucy/Analysis/EasyAnalyzer.c
+++ b/core/Lucy/Analysis/EasyAnalyzer.c
@@ -24,16 +24,16 @@
 #include "Lucy/Analysis/SnowballStemmer.h"
 
 EasyAnalyzer*
-EasyAnalyzer_new(const CharBuf *language) {
+EasyAnalyzer_new(const String *language) {
     EasyAnalyzer *self = (EasyAnalyzer*)VTable_Make_Obj(EASYANALYZER);
     return EasyAnalyzer_init(self, language);
 }
 
 EasyAnalyzer*
-EasyAnalyzer_init(EasyAnalyzer *self, const CharBuf *language) {
+EasyAnalyzer_init(EasyAnalyzer *self, const String *language) {
     Analyzer_init((Analyzer*)self);
     EasyAnalyzerIVARS *const ivars = EasyAnalyzer_IVARS(self);
-    ivars->language   = CB_Clone(language);
+    ivars->language   = Str_Clone(language);
     ivars->tokenizer  = StandardTokenizer_new();
     ivars->normalizer = Normalizer_new(NULL, true, false);
     ivars->stemmer    = SnowStemmer_new(language);
@@ -62,7 +62,7 @@ EasyAnalyzer_Transform_IMP(EasyAnalyzer *self, Inversion *inversion) {
 }
 
 Inversion*
-EasyAnalyzer_Transform_Text_IMP(EasyAnalyzer *self, CharBuf *text) {
+EasyAnalyzer_Transform_Text_IMP(EasyAnalyzer *self, String *text) {
     EasyAnalyzerIVARS *const ivars = EasyAnalyzer_IVARS(self);
     Inversion *inv1 = StandardTokenizer_Transform_Text(ivars->tokenizer, text);
     Inversion *inv2 = Normalizer_Transform(ivars->normalizer, inv1);
@@ -78,7 +78,7 @@ EasyAnalyzer_Dump_IMP(EasyAnalyzer *self) {
     EasyAnalyzer_Dump_t super_dump
         = SUPER_METHOD_PTR(EASYANALYZER, LUCY_EasyAnalyzer_Dump);
     Hash *dump = super_dump(self);
-    Hash_Store_Str(dump, "language", 8, (Obj*)CB_Clone(ivars->language));
+    Hash_Store_Str(dump, "language", 8, (Obj*)Str_Clone(ivars->language));
     return dump;
 }
 
@@ -88,8 +88,8 @@ EasyAnalyzer_Load_IMP(EasyAnalyzer *self, Obj *dump) {
         = SUPER_METHOD_PTR(EASYANALYZER, LUCY_EasyAnalyzer_Load);
     EasyAnalyzer *loaded = super_load(self, dump);
     Hash    *source = (Hash*)CERTIFY(dump, HASH);
-    CharBuf *language
-        = (CharBuf*)CERTIFY(Hash_Fetch_Str(source, "language", 8), CHARBUF);
+    String *language
+        = (String*)CERTIFY(Hash_Fetch_Str(source, "language", 8), STRING);
     return EasyAnalyzer_init(loaded, language);
 }
 
@@ -99,7 +99,7 @@ EasyAnalyzer_Equals_IMP(EasyAnalyzer *self, Obj *other) {
     if (!Obj_Is_A(other, EASYANALYZER))                     { return false; }
     EasyAnalyzerIVARS *const ivars = EasyAnalyzer_IVARS(self);
     EasyAnalyzerIVARS *const ovars = EasyAnalyzer_IVARS((EasyAnalyzer*)other);
-    if (!CB_Equals(ovars->language, (Obj*)ivars->language)) { return false; }
+    if (!Str_Equals(ovars->language, (Obj*)ivars->language)) { return false; }
     return true;
 }
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/2c3dbf15/core/Lucy/Analysis/EasyAnalyzer.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Analysis/EasyAnalyzer.cfh b/core/Lucy/Analysis/EasyAnalyzer.cfh
index e0c7498..e56db82 100644
--- a/core/Lucy/Analysis/EasyAnalyzer.cfh
+++ b/core/Lucy/Analysis/EasyAnalyzer.cfh
@@ -43,25 +43,25 @@ parcel Lucy;
  */
 public class Lucy::Analysis::EasyAnalyzer inherits Lucy::Analysis::Analyzer {
 
-    CharBuf *language;
+    String *language;
     StandardTokenizer *tokenizer;
     Normalizer *normalizer;
     SnowballStemmer *stemmer;
 
     inert incremented EasyAnalyzer*
-    new(const CharBuf *language = NULL);
+    new(const String *language = NULL);
 
     /**
      * @param language An ISO code from the list of supported languages.
      */
     public inert EasyAnalyzer*
-    init(EasyAnalyzer *self, const CharBuf *language = NULL);
+    init(EasyAnalyzer *self, const String *language = NULL);
 
     public incremented Inversion*
     Transform(EasyAnalyzer *self, Inversion *inversion);
 
     public incremented Inversion*
-    Transform_Text(EasyAnalyzer *self, CharBuf *text);
+    Transform_Text(EasyAnalyzer *self, String *text);
 
     public incremented Hash*
     Dump(EasyAnalyzer *self);

http://git-wip-us.apache.org/repos/asf/lucy/blob/2c3dbf15/core/Lucy/Analysis/Normalizer.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Analysis/Normalizer.c b/core/Lucy/Analysis/Normalizer.c
index af60f1b..924d966 100644
--- a/core/Lucy/Analysis/Normalizer.c
+++ b/core/Lucy/Analysis/Normalizer.c
@@ -28,29 +28,29 @@
 #define INITIAL_BUFSIZE 63
 
 Normalizer*
-Normalizer_new(const CharBuf *form, bool case_fold, bool strip_accents) {
+Normalizer_new(const String *form, bool case_fold, bool strip_accents) {
     Normalizer *self = (Normalizer*)VTable_Make_Obj(NORMALIZER);
     return Normalizer_init(self, form, case_fold, strip_accents);
 }
 
 Normalizer*
-Normalizer_init(Normalizer *self, const CharBuf *form, bool case_fold,
+Normalizer_init(Normalizer *self, const String *form, bool case_fold,
                 bool strip_accents) {
     int options = UTF8PROC_STABLE;
     NormalizerIVARS *const ivars = Normalizer_IVARS(self);
 
     if (form == NULL
-        || CB_Equals_Str(form, "NFKC", 4) || CB_Equals_Str(form, "nfkc", 4)
+        || Str_Equals_Str(form, "NFKC", 4) || Str_Equals_Str(form, "nfkc", 4)
        ) {
         options |= UTF8PROC_COMPOSE | UTF8PROC_COMPAT;
     }
-    else if (CB_Equals_Str(form, "NFC", 3) || CB_Equals_Str(form, "nfc", 3)) {
+    else if (Str_Equals_Str(form, "NFC", 3) || Str_Equals_Str(form, "nfc", 3)) {
         options |= UTF8PROC_COMPOSE;
     }
-    else if (CB_Equals_Str(form, "NFKD", 4) || CB_Equals_Str(form, "nfkd", 4)) {
+    else if (Str_Equals_Str(form, "NFKD", 4) || Str_Equals_Str(form, "nfkd", 4)) {
         options |= UTF8PROC_DECOMPOSE | UTF8PROC_COMPAT;
     }
-    else if (CB_Equals_Str(form, "NFD", 3) || CB_Equals_Str(form, "nfd", 3)) {
+    else if (Str_Equals_Str(form, "NFD", 3) || Str_Equals_Str(form, "nfd", 3)) {
         options |= UTF8PROC_DECOMPOSE;
     }
     else {
@@ -125,13 +125,13 @@ Normalizer_Dump_IMP(Normalizer *self) {
     Hash *dump = super_dump(self);
     int options = Normalizer_IVARS(self)->options;
 
-    CharBuf *form = options & UTF8PROC_COMPOSE ?
+    String *form = options & UTF8PROC_COMPOSE ?
                     options & UTF8PROC_COMPAT ?
-                    CB_new_from_trusted_utf8("NFKC", 4) :
-                    CB_new_from_trusted_utf8("NFC", 3) :
+                    Str_new_from_trusted_utf8("NFKC", 4) :
+                    Str_new_from_trusted_utf8("NFC", 3) :
                         options & UTF8PROC_COMPAT ?
-                        CB_new_from_trusted_utf8("NFKD", 4) :
-                        CB_new_from_trusted_utf8("NFD", 3);
+                        Str_new_from_trusted_utf8("NFKD", 4) :
+                        Str_new_from_trusted_utf8("NFD", 3);
 
     Hash_Store_Str(dump, "normalization_form", 18, (Obj*)form);
 
@@ -152,7 +152,7 @@ Normalizer_Load_IMP(Normalizer *self, Obj *dump) {
     Hash    *source = (Hash*)CERTIFY(dump, HASH);
 
     Obj *obj = Hash_Fetch_Str(source, "normalization_form", 18);
-    CharBuf *form = (CharBuf*)CERTIFY(obj, CHARBUF);
+    String *form = (String*)CERTIFY(obj, STRING);
     obj = Hash_Fetch_Str(source, "case_fold", 9);
     bool case_fold = Bool_Get_Value((BoolNum*)CERTIFY(obj, BOOLNUM));
     obj = Hash_Fetch_Str(source, "strip_accents", 13);

http://git-wip-us.apache.org/repos/asf/lucy/blob/2c3dbf15/core/Lucy/Analysis/Normalizer.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Analysis/Normalizer.cfh b/core/Lucy/Analysis/Normalizer.cfh
index c65d5f1..4787e14 100644
--- a/core/Lucy/Analysis/Normalizer.cfh
+++ b/core/Lucy/Analysis/Normalizer.cfh
@@ -32,7 +32,7 @@ public class Lucy::Analysis::Normalizer inherits Lucy::Analysis::Analyzer {
     int options;
 
     inert incremented Normalizer*
-    new(const CharBuf *normalization_form = NULL, bool case_fold = true,
+    new(const String *normalization_form = NULL, bool case_fold = true,
         bool strip_accents = false);
 
     /**
@@ -42,7 +42,7 @@ public class Lucy::Analysis::Normalizer inherits Lucy::Analysis::Analyzer {
      * @param strip_accents Strip accents, default is false.
      */
     public inert Normalizer*
-    init(Normalizer *self, const CharBuf *normalization_form = NULL,
+    init(Normalizer *self, const String *normalization_form = NULL,
         bool case_fold = true, bool strip_accents = false);
 
     public incremented Inversion*

http://git-wip-us.apache.org/repos/asf/lucy/blob/2c3dbf15/core/Lucy/Analysis/PolyAnalyzer.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Analysis/PolyAnalyzer.c b/core/Lucy/Analysis/PolyAnalyzer.c
index 761173a..00f8a4a 100644
--- a/core/Lucy/Analysis/PolyAnalyzer.c
+++ b/core/Lucy/Analysis/PolyAnalyzer.c
@@ -26,13 +26,13 @@
 #include "Lucy/Util/Freezer.h"
 
 PolyAnalyzer*
-PolyAnalyzer_new(const CharBuf *language, VArray *analyzers) {
+PolyAnalyzer_new(const String *language, VArray *analyzers) {
     PolyAnalyzer *self = (PolyAnalyzer*)VTable_Make_Obj(POLYANALYZER);
     return PolyAnalyzer_init(self, language, analyzers);
 }
 
 PolyAnalyzer*
-PolyAnalyzer_init(PolyAnalyzer *self, const CharBuf *language,
+PolyAnalyzer_init(PolyAnalyzer *self, const String *language,
                   VArray *analyzers) {
     Analyzer_init((Analyzer*)self);
     PolyAnalyzerIVARS *const ivars = PolyAnalyzer_IVARS(self);
@@ -85,14 +85,14 @@ PolyAnalyzer_Transform_IMP(PolyAnalyzer *self, Inversion *inversion) {
 }
 
 Inversion*
-PolyAnalyzer_Transform_Text_IMP(PolyAnalyzer *self, CharBuf *text) {
+PolyAnalyzer_Transform_Text_IMP(PolyAnalyzer *self, String *text) {
     VArray *const   analyzers     = PolyAnalyzer_IVARS(self)->analyzers;
     const uint32_t  num_analyzers = VA_Get_Size(analyzers);
     Inversion      *retval;
 
     if (num_analyzers == 0) {
-        size_t  token_len = CB_Get_Size(text);
-        char   *buf       = (char*)CB_Get_Ptr8(text);
+        size_t  token_len = Str_Get_Size(text);
+        char   *buf       = (char*)Str_Get_Ptr8(text);
         Token  *seed      = Token_new(buf, token_len, 0, token_len, 1.0f, 1);
         retval = Inversion_new(seed);
         DECREF(seed);

http://git-wip-us.apache.org/repos/asf/lucy/blob/2c3dbf15/core/Lucy/Analysis/PolyAnalyzer.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Analysis/PolyAnalyzer.cfh b/core/Lucy/Analysis/PolyAnalyzer.cfh
index 2bafa55..88fd693 100644
--- a/core/Lucy/Analysis/PolyAnalyzer.cfh
+++ b/core/Lucy/Analysis/PolyAnalyzer.cfh
@@ -52,7 +52,7 @@ public class Lucy::Analysis::PolyAnalyzer inherits Lucy::Analysis::Analyzer {
     VArray  *analyzers;
 
     inert incremented PolyAnalyzer*
-    new(const CharBuf *language = NULL, VArray *analyzers = NULL);
+    new(const String *language = NULL, VArray *analyzers = NULL);
 
     /**
      * @param language An ISO code from the list of supported languages.
@@ -65,7 +65,7 @@ public class Lucy::Analysis::PolyAnalyzer inherits Lucy::Analysis::Analyzer {
      * stopalize, stem.
      */
     public inert PolyAnalyzer*
-    init(PolyAnalyzer *self, const CharBuf *language = NULL,
+    init(PolyAnalyzer *self, const String *language = NULL,
          VArray *analyzers = NULL);
 
     /** Getter for "analyzers" member.
@@ -77,7 +77,7 @@ public class Lucy::Analysis::PolyAnalyzer inherits Lucy::Analysis::Analyzer {
     Transform(PolyAnalyzer *self, Inversion *inversion);
 
     public incremented Inversion*
-    Transform_Text(PolyAnalyzer *self, CharBuf *text);
+    Transform_Text(PolyAnalyzer *self, String *text);
 
     public bool
     Equals(PolyAnalyzer *self, Obj *other);

http://git-wip-us.apache.org/repos/asf/lucy/blob/2c3dbf15/core/Lucy/Analysis/RegexTokenizer.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Analysis/RegexTokenizer.c b/core/Lucy/Analysis/RegexTokenizer.c
index 8f2e855..ee8be64 100644
--- a/core/Lucy/Analysis/RegexTokenizer.c
+++ b/core/Lucy/Analysis/RegexTokenizer.c
@@ -23,7 +23,7 @@
 #include "Lucy/Analysis/Inversion.h"
 
 RegexTokenizer*
-RegexTokenizer_new(const CharBuf *pattern) {
+RegexTokenizer_new(const String *pattern) {
     RegexTokenizer *self = (RegexTokenizer*)VTable_Make_Obj(REGEXTOKENIZER);
     return RegexTokenizer_init(self, pattern);
 }
@@ -43,10 +43,10 @@ RegexTokenizer_Transform_IMP(RegexTokenizer *self, Inversion *inversion) {
 }
 
 Inversion*
-RegexTokenizer_Transform_Text_IMP(RegexTokenizer *self, CharBuf *text) {
+RegexTokenizer_Transform_Text_IMP(RegexTokenizer *self, String *text) {
     Inversion *new_inversion = Inversion_new(NULL);
-    RegexTokenizer_Tokenize_Str(self, (char*)CB_Get_Ptr8(text),
-                                CB_Get_Size(text), new_inversion);
+    RegexTokenizer_Tokenize_Str(self, (char*)Str_Get_Ptr8(text),
+                                Str_Get_Size(text), new_inversion);
     return new_inversion;
 }
 
@@ -56,7 +56,7 @@ RegexTokenizer_Dump_IMP(RegexTokenizer *self) {
     RegexTokenizer_Dump_t super_dump
         = SUPER_METHOD_PTR(REGEXTOKENIZER, LUCY_RegexTokenizer_Dump);
     Hash *dump = (Hash*)CERTIFY(super_dump(self), HASH);
-    Hash_Store_Str(dump, "pattern", 7, (Obj*)CB_Clone(ivars->pattern));
+    Hash_Store_Str(dump, "pattern", 7, (Obj*)Str_Clone(ivars->pattern));
     return (Obj*)dump;
 }
 
@@ -66,8 +66,8 @@ RegexTokenizer_Load_IMP(RegexTokenizer *self, Obj *dump) {
     RegexTokenizer_Load_t super_load
         = SUPER_METHOD_PTR(REGEXTOKENIZER, LUCY_RegexTokenizer_Load);
     RegexTokenizer *loaded = super_load(self, dump);
-    CharBuf *pattern 
-        = (CharBuf*)CERTIFY(Hash_Fetch_Str(source, "pattern", 7), CHARBUF);
+    String *pattern 
+        = (String*)CERTIFY(Hash_Fetch_Str(source, "pattern", 7), STRING);
     return RegexTokenizer_init(loaded, pattern);
 }
 
@@ -77,7 +77,7 @@ RegexTokenizer_Equals_IMP(RegexTokenizer *self, Obj *other) {
     if (!Obj_Is_A(other, REGEXTOKENIZER))                 { return false; }
     RegexTokenizerIVARS *ivars = RegexTokenizer_IVARS(self);
     RegexTokenizerIVARS *ovars = RegexTokenizer_IVARS((RegexTokenizer*)other);
-    if (!CB_Equals(ivars->pattern, (Obj*)ovars->pattern)) { return false; }
+    if (!Str_Equals(ivars->pattern, (Obj*)ovars->pattern)) { return false; }
     return true;
 }
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/2c3dbf15/core/Lucy/Analysis/RegexTokenizer.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Analysis/RegexTokenizer.cfh b/core/Lucy/Analysis/RegexTokenizer.cfh
index 72c7097..edef1b6 100644
--- a/core/Lucy/Analysis/RegexTokenizer.cfh
+++ b/core/Lucy/Analysis/RegexTokenizer.cfh
@@ -50,7 +50,7 @@ parcel Lucy;
 public class Lucy::Analysis::RegexTokenizer
     inherits Lucy::Analysis::Analyzer {
 
-    CharBuf *pattern;
+    String *pattern;
     void    *token_re;
 
     /**
@@ -60,7 +60,7 @@ public class Lucy::Analysis::RegexTokenizer
     is_available();
 
     inert incremented RegexTokenizer*
-    new(const CharBuf *pattern = NULL);
+    new(const String *pattern = NULL);
 
     /**
      * @param pattern A string specifying a Perl-syntax regular expression
@@ -69,13 +69,13 @@ public class Lucy::Analysis::RegexTokenizer
      * "it" and "O'Henry's" as well as "Henry".
      */
     public inert RegexTokenizer*
-    init(RegexTokenizer *self, const CharBuf *pattern = NULL);
+    init(RegexTokenizer *self, const String *pattern = NULL);
 
     public incremented Inversion*
     Transform(RegexTokenizer *self, Inversion *inversion);
 
     public incremented Inversion*
-    Transform_Text(RegexTokenizer *self, CharBuf *text);
+    Transform_Text(RegexTokenizer *self, String *text);
 
     /** Tokenize the supplied string and add any Tokens generated to the
      * supplied Inversion.

http://git-wip-us.apache.org/repos/asf/lucy/blob/2c3dbf15/core/Lucy/Analysis/SnowballStemmer.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Analysis/SnowballStemmer.c b/core/Lucy/Analysis/SnowballStemmer.c
index 1c5a632..3df82a4 100644
--- a/core/Lucy/Analysis/SnowballStemmer.c
+++ b/core/Lucy/Analysis/SnowballStemmer.c
@@ -26,21 +26,21 @@
 #include "libstemmer.h"
 
 SnowballStemmer*
-SnowStemmer_new(const CharBuf *language) {
+SnowStemmer_new(const String *language) {
     SnowballStemmer *self = (SnowballStemmer*)VTable_Make_Obj(SNOWBALLSTEMMER);
     return SnowStemmer_init(self, language);
 }
 
 SnowballStemmer*
-SnowStemmer_init(SnowballStemmer *self, const CharBuf *language) {
+SnowStemmer_init(SnowballStemmer *self, const String *language) {
     char lang_buf[3];
     Analyzer_init((Analyzer*)self);
     SnowballStemmerIVARS *const ivars = SnowStemmer_IVARS(self);
-    ivars->language = CB_Clone(language);
+    ivars->language = Str_Clone(language);
 
     // Get a Snowball stemmer.  Be case-insensitive.
-    lang_buf[0] = tolower(CB_Code_Point_At(language, 0));
-    lang_buf[1] = tolower(CB_Code_Point_At(language, 1));
+    lang_buf[0] = tolower(Str_Code_Point_At(language, 0));
+    lang_buf[1] = tolower(Str_Code_Point_At(language, 1));
     lang_buf[2] = '\0';
     ivars->snowstemmer = sb_stemmer_new(lang_buf, "UTF_8");
     if (!ivars->snowstemmer) {
@@ -90,7 +90,7 @@ SnowStemmer_Dump_IMP(SnowballStemmer *self) {
     SnowStemmer_Dump_t super_dump
         = SUPER_METHOD_PTR(SNOWBALLSTEMMER, LUCY_SnowStemmer_Dump);
     Hash *dump = super_dump(self);
-    Hash_Store_Str(dump, "language", 8, (Obj*)CB_Clone(ivars->language));
+    Hash_Store_Str(dump, "language", 8, (Obj*)Str_Clone(ivars->language));
     return dump;
 }
 
@@ -100,8 +100,8 @@ SnowStemmer_Load_IMP(SnowballStemmer *self, Obj *dump) {
         = SUPER_METHOD_PTR(SNOWBALLSTEMMER, LUCY_SnowStemmer_Load);
     SnowballStemmer *loaded = super_load(self, dump);
     Hash    *source = (Hash*)CERTIFY(dump, HASH);
-    CharBuf *language 
-        = (CharBuf*)CERTIFY(Hash_Fetch_Str(source, "language", 8), CHARBUF);
+    String *language 
+        = (String*)CERTIFY(Hash_Fetch_Str(source, "language", 8), STRING);
     return SnowStemmer_init(loaded, language);
 }
 
@@ -111,7 +111,7 @@ SnowStemmer_Equals_IMP(SnowballStemmer *self, Obj *other) {
     if (!Obj_Is_A(other, SNOWBALLSTEMMER))                  { return false; }
     SnowballStemmerIVARS *ivars = SnowStemmer_IVARS(self);
     SnowballStemmerIVARS *ovars = SnowStemmer_IVARS((SnowballStemmer*)other);
-    if (!CB_Equals(ovars->language, (Obj*)ivars->language)) { return false; }
+    if (!Str_Equals(ovars->language, (Obj*)ivars->language)) { return false; }
     return true;
 }
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/2c3dbf15/core/Lucy/Analysis/SnowballStemmer.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Analysis/SnowballStemmer.cfh b/core/Lucy/Analysis/SnowballStemmer.cfh
index e644dbc..d622c83 100644
--- a/core/Lucy/Analysis/SnowballStemmer.cfh
+++ b/core/Lucy/Analysis/SnowballStemmer.cfh
@@ -29,17 +29,17 @@ public class Lucy::Analysis::SnowballStemmer cnick SnowStemmer
     inherits Lucy::Analysis::Analyzer {
 
     void *snowstemmer;
-    CharBuf *language;
+    String *language;
 
     inert incremented SnowballStemmer*
-    new(const CharBuf *language);
+    new(const String *language);
 
     /**
      * @param language A two-letter ISO code identifying a language supported
      * by Snowball.
      */
     public inert SnowballStemmer*
-    init(SnowballStemmer *self, const CharBuf *language);
+    init(SnowballStemmer *self, const String *language);
 
     public incremented Inversion*
     Transform(SnowballStemmer *self, Inversion *inversion);

http://git-wip-us.apache.org/repos/asf/lucy/blob/2c3dbf15/core/Lucy/Analysis/SnowballStopFilter.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Analysis/SnowballStopFilter.c b/core/Lucy/Analysis/SnowballStopFilter.c
index 8a903b7..c6ffb97 100644
--- a/core/Lucy/Analysis/SnowballStopFilter.c
+++ b/core/Lucy/Analysis/SnowballStopFilter.c
@@ -25,13 +25,13 @@
 #include "Lucy/Util/Freezer.h"
 
 SnowballStopFilter*
-SnowStop_new(const CharBuf *language, Hash *stoplist) {
+SnowStop_new(const String *language, Hash *stoplist) {
     SnowballStopFilter *self = (SnowballStopFilter*)VTable_Make_Obj(SNOWBALLSTOPFILTER);
     return SnowStop_init(self, language, stoplist);
 }
 
 SnowballStopFilter*
-SnowStop_init(SnowballStopFilter *self, const CharBuf *language,
+SnowStop_init(SnowballStopFilter *self, const String *language,
               Hash *stoplist) {
     Analyzer_init((Analyzer*)self);
     SnowballStopFilterIVARS *const ivars = SnowStop_IVARS(self);
@@ -118,24 +118,24 @@ SnowStop_Load_IMP(SnowballStopFilter *self, Obj *dump) {
 }
 
 Hash*
-SnowStop_gen_stoplist(const CharBuf *language) {
-    CharBuf *lang = CB_new(3);
-    CB_Cat_Char(lang, tolower(CB_Code_Point_At(language, 0)));
-    CB_Cat_Char(lang, tolower(CB_Code_Point_At(language, 1)));
+SnowStop_gen_stoplist(const String *language) {
+    String *lang = Str_new(3);
+    Str_Cat_Char(lang, tolower(Str_Code_Point_At(language, 0)));
+    Str_Cat_Char(lang, tolower(Str_Code_Point_At(language, 1)));
     const uint8_t **words = NULL;
-    if (CB_Equals_Str(lang, "da", 2))      { words = SnowStop_snow_da; }
-    else if (CB_Equals_Str(lang, "de", 2)) { words = SnowStop_snow_de; }
-    else if (CB_Equals_Str(lang, "en", 2)) { words = SnowStop_snow_en; }
-    else if (CB_Equals_Str(lang, "es", 2)) { words = SnowStop_snow_es; }
-    else if (CB_Equals_Str(lang, "fi", 2)) { words = SnowStop_snow_fi; }
-    else if (CB_Equals_Str(lang, "fr", 2)) { words = SnowStop_snow_fr; }
-    else if (CB_Equals_Str(lang, "hu", 2)) { words = SnowStop_snow_hu; }
-    else if (CB_Equals_Str(lang, "it", 2)) { words = SnowStop_snow_it; }
-    else if (CB_Equals_Str(lang, "nl", 2)) { words = SnowStop_snow_nl; }
-    else if (CB_Equals_Str(lang, "no", 2)) { words = SnowStop_snow_no; }
-    else if (CB_Equals_Str(lang, "pt", 2)) { words = SnowStop_snow_pt; }
-    else if (CB_Equals_Str(lang, "ru", 2)) { words = SnowStop_snow_ru; }
-    else if (CB_Equals_Str(lang, "sv", 2)) { words = SnowStop_snow_sv; }
+    if (Str_Equals_Str(lang, "da", 2))      { words = SnowStop_snow_da; }
+    else if (Str_Equals_Str(lang, "de", 2)) { words = SnowStop_snow_de; }
+    else if (Str_Equals_Str(lang, "en", 2)) { words = SnowStop_snow_en; }
+    else if (Str_Equals_Str(lang, "es", 2)) { words = SnowStop_snow_es; }
+    else if (Str_Equals_Str(lang, "fi", 2)) { words = SnowStop_snow_fi; }
+    else if (Str_Equals_Str(lang, "fr", 2)) { words = SnowStop_snow_fr; }
+    else if (Str_Equals_Str(lang, "hu", 2)) { words = SnowStop_snow_hu; }
+    else if (Str_Equals_Str(lang, "it", 2)) { words = SnowStop_snow_it; }
+    else if (Str_Equals_Str(lang, "nl", 2)) { words = SnowStop_snow_nl; }
+    else if (Str_Equals_Str(lang, "no", 2)) { words = SnowStop_snow_no; }
+    else if (Str_Equals_Str(lang, "pt", 2)) { words = SnowStop_snow_pt; }
+    else if (Str_Equals_Str(lang, "ru", 2)) { words = SnowStop_snow_ru; }
+    else if (Str_Equals_Str(lang, "sv", 2)) { words = SnowStop_snow_sv; }
     else {
         DECREF(lang);
         return NULL;
@@ -146,7 +146,7 @@ SnowStop_gen_stoplist(const CharBuf *language) {
     for (uint32_t i = 0; words[i] != NULL; i++) {
         char *word = (char*)words[i];
         ViewCharBuf *stop = ViewCB_new_from_trusted_utf8(word, strlen(word));
-        NoCloneHash_Store(stoplist, (Obj*)stop, (Obj*)CB_newf(""));
+        NoCloneHash_Store(stoplist, (Obj*)stop, (Obj*)Str_newf(""));
         DECREF(stop);
     }
     DECREF(lang);

http://git-wip-us.apache.org/repos/asf/lucy/blob/2c3dbf15/core/Lucy/Analysis/SnowballStopFilter.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Analysis/SnowballStopFilter.cfh b/core/Lucy/Analysis/SnowballStopFilter.cfh
index 1c253e6..df008aa 100644
--- a/core/Lucy/Analysis/SnowballStopFilter.cfh
+++ b/core/Lucy/Analysis/SnowballStopFilter.cfh
@@ -74,20 +74,20 @@ public class Lucy::Analysis::SnowballStopFilter cnick SnowStop
     inert const uint8_t** snow_sv;
 
     inert incremented SnowballStopFilter*
-    new(const CharBuf *language = NULL, Hash *stoplist = NULL);
+    new(const String *language = NULL, Hash *stoplist = NULL);
 
     /**
      * @param stoplist A hash with stopwords as the keys.
      * @param language The ISO code for a supported language.
      */
     public inert SnowballStopFilter*
-    init(SnowballStopFilter *self, const CharBuf *language = NULL,
+    init(SnowballStopFilter *self, const String *language = NULL,
          Hash *stoplist = NULL);
 
     /** Return a Hash with the Snowball stoplist for the supplied language.
      */
     inert incremented Hash*
-    gen_stoplist(const CharBuf *language);
+    gen_stoplist(const String *language);
 
     public incremented Inversion*
     Transform(SnowballStopFilter *self, Inversion *inversion);

http://git-wip-us.apache.org/repos/asf/lucy/blob/2c3dbf15/core/Lucy/Analysis/StandardTokenizer.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Analysis/StandardTokenizer.c b/core/Lucy/Analysis/StandardTokenizer.c
index 9a02c48..eaa68f5 100644
--- a/core/Lucy/Analysis/StandardTokenizer.c
+++ b/core/Lucy/Analysis/StandardTokenizer.c
@@ -95,10 +95,10 @@ StandardTokenizer_Transform_IMP(StandardTokenizer *self, Inversion *inversion) {
 }
 
 Inversion*
-StandardTokenizer_Transform_Text_IMP(StandardTokenizer *self, CharBuf *text) {
+StandardTokenizer_Transform_Text_IMP(StandardTokenizer *self, String *text) {
     Inversion *new_inversion = Inversion_new(NULL);
-    StandardTokenizer_Tokenize_Str(self, (char*)CB_Get_Ptr8(text),
-                                   CB_Get_Size(text), new_inversion);
+    StandardTokenizer_Tokenize_Str(self, (char*)Str_Get_Ptr8(text),
+                                   Str_Get_Size(text), new_inversion);
     return new_inversion;
 }
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/2c3dbf15/core/Lucy/Analysis/StandardTokenizer.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Analysis/StandardTokenizer.cfh b/core/Lucy/Analysis/StandardTokenizer.cfh
index 04af965..6e4041a 100644
--- a/core/Lucy/Analysis/StandardTokenizer.cfh
+++ b/core/Lucy/Analysis/StandardTokenizer.cfh
@@ -41,7 +41,7 @@ public class Lucy::Analysis::StandardTokenizer
     Transform(StandardTokenizer *self, Inversion *inversion);
 
     public incremented Inversion*
-    Transform_Text(StandardTokenizer *self, CharBuf *text);
+    Transform_Text(StandardTokenizer *self, String *text);
 
     /** Tokenize the supplied string and add any Tokens generated to the
      * supplied Inversion.

http://git-wip-us.apache.org/repos/asf/lucy/blob/2c3dbf15/core/Lucy/Document/Doc.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Document/Doc.cfh b/core/Lucy/Document/Doc.cfh
index 12df64d..b7dc120 100644
--- a/core/Lucy/Document/Doc.cfh
+++ b/core/Lucy/Document/Doc.cfh
@@ -51,7 +51,7 @@ public class Lucy::Document::Doc inherits Clownfish::Obj {
     /** Store a field value in the Doc.
      */
     void
-    Store(Doc *self, const CharBuf *field, Obj *value);
+    Store(Doc *self, const String *field, Obj *value);
 
     /** Set the doc's field's attribute.
      */
@@ -74,7 +74,7 @@ public class Lucy::Document::Doc inherits Clownfish::Obj {
      * object returned.
      */
     nullable Obj*
-    Extract(Doc *self, CharBuf *field, ViewCharBuf *target);
+    Extract(Doc *self, String *field, ViewCharBuf *target);
 
     /* Unimplemented methods.
      */

http://git-wip-us.apache.org/repos/asf/lucy/blob/2c3dbf15/core/Lucy/Document/HitDoc.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Document/HitDoc.c b/core/Lucy/Document/HitDoc.c
index f7216fb..83cfdf9 100644
--- a/core/Lucy/Document/HitDoc.c
+++ b/core/Lucy/Document/HitDoc.c
@@ -70,7 +70,7 @@ HitDoc_Dump_IMP(HitDoc *self) {
     HitDoc_Dump_t super_dump
         = SUPER_METHOD_PTR(HITDOC, LUCY_HitDoc_Dump);
     Hash *dump = super_dump(self);
-    Hash_Store_Str(dump, "score", 5, (Obj*)CB_newf("%f64", ivars->score));
+    Hash_Store_Str(dump, "score", 5, (Obj*)Str_newf("%f64", ivars->score));
     return dump;
 }
 


Mime
View raw message