This patch tidies up a few of the comments in string.c, and fixes one
 actual documentation bug -- namely, string_chopn removes the last
 n _characters_, not the last n _bytes_.

 Simon


--- string.c.old        Thu Apr 11 19:01:31 2002
+++ string.c    Thu Apr 11 19:06:47 2002
@@ -87,7 +87,7 @@
 }

 /*=for api string string_destroy
- * free the strings memory
+ * free the string's memory
  */
 void
 string_destroy(STRING *s)
@@ -260,7 +260,7 @@
 /* vtable despatch functions */

 /*=for api string string_compute_strlen
- * get the string length of the string
+ * calculate the length (in characters) of the string
  */
 INTVAL
 string_compute_strlen(STRING *s)
@@ -535,7 +535,7 @@
 }

 /*=for api string string_chopn
- * chop the last n bytes off of s.
+ * chop off the last n characters of s.
  */
 STRING *
 string_chopn(STRING *s, INTVAL n)
@@ -561,7 +561,8 @@
 }

 /*=for api string string_compare
- * compare two strings.
+ * compare two strings, performing type and encoding conversions if
+ * necessary
  */
 INTVAL
 string_compare(struct Parrot_Interp *interpreter, const STRING *s1,

Reply via email to