Index: doc/theses/mike_brooks_MMath/string.tex
===================================================================
--- doc/theses/mike_brooks_MMath/string.tex	(revision fc8ec54edf06f75aaa375fdcd95505d3838f134d)
+++ doc/theses/mike_brooks_MMath/string.tex	(revision f8913b7c11ea07372f32703126c8512a598f1cdb)
@@ -59,6 +59,13 @@
 A \CFA string manages its length separately from the string, so there is no null (@'\0'@) terminating value at the end of a string value.
 Hence, a \CFA string cannot be passed to a C string manipulation routine, such as @strcat@.
-Like C strings, the characters in a @string@ are numbered starting from 0.
-
+Like C strings, characters in a @string@ are numbered from the left starting at 0, and in \CFA numbered from the right starting at -1.
+\begin{cquote}
+\sf
+\begin{tabular}{@{}rrrrrl@{}}
+\small\tt a & \small\tt b & \small\tt c & \small\tt d & \small\tt e \\
+0 & 1 & 2 & 3 & 4 & left to right index \\
+-5 & -4 & -3 & -2 & -1 & right to left index
+\end{tabular}
+\end{cquote}
 The following operations have been defined to manipulate an instance of type @string@.
 The discussion assumes the following declarations and assignment statements are executed.
@@ -123,5 +130,5 @@
 	s = 'x';
 	s = "abc";
-	char cs[5] = "abc";
+	char cs[] = "abc";
 	s = cs;
 	// conversion of integral, floating-point, and complex to string
@@ -269,17 +276,29 @@
 A negative length means that characters are selected in the opposite (right to left) direction from the starting position.
 If the substring request extends beyond the beginning or end of the string, it is clipped (shortened) to the bounds of the string.
-If the substring request is completely outside of the original string, a null string located at the end of the original string is returned.
-
-The substring operation can also appear on the left hand side of the assignment operator.
-The substring is replaced by the value on the right hand side of the assignment.
-The length of the right-hand-side value may be shorter, the same length, or longer than the length of the substring that is selected on the left hand side of the assignment.
-\begin{cfa}
-digit( 3, 3 ) = "";   				$\C{// digit is assigned "0156789"}$
-digit( 4, 3 ) = "xyz";				$\C{// digit is assigned "015xyz9"}$
-digit( 7, 0 ) = "***";				$\C{// digit is assigned "015xyz***9"}$
-digit(-4, 3 ) = "$\tt\$\$\$$";		$\C{// digit is assigned "015xyz\$\$\$9"}$
-\end{cfa}
+If the substring request is completely outside of the original string, a null string is returned.
+
+The substring operation can also appear on the left side of an assignment and replaced by the string value on the right side.
+The length of the right string may be shorter, the same length, or longer than the length of left string.
+Hence, the left string may decrease, stay the same, or increase in length.
+\begin{cquote}
+\setlength{\tabcolsep}{15pt}
+\begin{tabular}{@{}l|l@{}}
+\begin{cfa}
+digit( 3, 3 ) = "";
+digit( 4, 3 ) = "xyz";
+digit( 7, 0 ) = "***";
+digit(-4, 3 ) = "$\tt\$\$\$$";
+\end{cfa}
+&
+\begin{cfa}
+0126789
+0126xyz
+0126xyz
+012$\$\$\$$z
+\end{cfa}
+\end{tabular}
+\end{cquote}
 A substring is treated as a pointer into the base (substringed) string rather than creating a copy of the subtext.
-As with all pointers, if the item they are pointing at is changed, then the pointer is referring to the changed item.
+Hence, if the referenced item is changed, then the pointer sees the change.
 Pointers to the result value of a substring operation are defined to always start at the same location in their base string as long as that starting location exists, independent of changes to themselves or the base string.
 However, if the base string value changes, this may affect the values of one or more of the substrings to that base string.
@@ -315,5 +334,5 @@
 \begin{cfa}
 s = name( 2 );						$\C{// s is assigned "ETER"}$
-name( 2 ) = "IPER";				$\C{// name is assigned "PIPER"}$
+name( 2 ) = "IPER";					$\C{// name is assigned "PIPER"}$
 \end{cfa}
 It is also possible to substring using a string as the index for selecting the substring portion of the string.
@@ -332,5 +351,5 @@
 The @index@ operation
 \begin{cfa}
-int index( const string &key, int start = 1, occurrence occ = first );
+int index( const string & key, int start = 1, occurrence occ = first );
 \end{cfa}
 returns the position of the first or last occurrence of the @key@ (depending on the occurrence indicator @occ@ that is either @first@ or @last@) in the current string starting the search at position @start@.
@@ -338,11 +357,22 @@
 %If the @key@ has zero length, the value 1 is returned regardless of what the current string contains.
 A negative starting position is a specification from the right end of the string.
-\begin{cfa}
-i = digit.index( "567" );			$\C{// i is assigned 3}$
-i = digit.index( "567", 7 );		$\C{// i is assigned 11}$
-i = digit.index( "567", -1, last );	$\C{// i is assigned 3}$
-i = name.index( "E", 5, last );	$\C{// i is assigned 4}$
-\end{cfa}
-
+\begin{cquote}
+\setlength{\tabcolsep}{15pt}
+\begin{tabular}{@{}l|l@{}}
+\begin{cfa}
+i = find( digit, "567" );
+i = find( digit, "567", 7 );
+i = digit.index( "567", -1, last );
+i = name.index( "E", 5, last );
+\end{cfa}
+&
+\begin{cfa}
+5
+10
+
+
+\end{cfa}
+\end{tabular}
+\end{cquote}
 The next two string operations test a string to see if it is or is not composed completely of a particular class of characters.
 For example, are the characters of a string all alphabetic or all numeric?
