<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -22,6 +22,52 @@ class StringSpec extends Midori_PHPUnit_Spec
 		$value = str('I am %2$s, hear me roar, %1$s!')
 					-&gt;format($arg1, $arg2);
 		
+		
 		$this-&gt;expectsThat($value)-&gt;shouldBe(&quot;I am man, hear me roar, yipe!&quot;);
 	}
+	
+	/**
+	 * @test
+	 * Enter description here...
+	 * @return unknown_type
+	 */
+	public function itShouldCompareStrings()
+	{
+		$first = str(&quot;I am first&quot;);
+		$second = &quot;Second in line&quot;;
+		$cut = &quot;cutting in line&quot;;
+		$caseCute = str(&quot;Cutting in line&quot;);
+		
+		$compare = $first-&gt;compareTo($second);
+		$this-&gt;expectsThat($compare)-&gt;shouldBe(-1);
+		
+		$compare = $first-&gt;compareTo($cut, true);
+		$this-&gt;expectsThat($compare)-&gt;shouldBe(1);
+		
+		$compare = $caseCute-&gt;compareTo($cut);
+		$this-&gt;expectsThat($compare)-&gt;shouldBe(-1);
+		
+		$compare = $caseCute-&gt;compareTo($cut, true);
+		$this-&gt;expectsThat($compare)-&gt;shouldBe(0);
+	}
+	
+	/**
+	 * @test
+	 * Enter description here...
+	 * @return unknown_type
+	 */
+	public function itShouldConcatinateStrings()
+	{
+		$array = array(&quot;I have&quot;, &quot; a enumerable object &quot;, &quot;of strings&quot;);
+		$start = new Midori_String(&quot;notice:&quot;);
+		$container = $start-&gt;concat(&quot; this is a test. &quot;);
+		foreach($array as $value)
+			$container = $container-&gt;concat($value);
+
+		$this-&gt;expectsThat($start)-&gt;equals(&quot;notice:&quot;);
+		
+		$this-&gt;expectsThat($container)
+			-&gt;equals(&quot;notice: this is a test. I have a enumerable object of strings&quot;);
+		
+	}
 }
\ No newline at end of file</diff>
      <filename>specs/Midori/StringSpec.php</filename>
    </modified>
    <modified>
      <diff>@@ -20,8 +20,11 @@ final class Midori_String extends Midori_Nullable
 	 */
 	public function __construct($value = &quot;&quot;)
 	{
-		$this-&gt;value = (string)$value;
+		if($value instanceof Midori_Nullable)
+			$value = $value-&gt;value;
 		
+		if($value != null)
+			$this-&gt;value = $value;	
 	}
 	
 
@@ -36,16 +39,99 @@ final class Midori_String extends Midori_Nullable
 	}	
 	
 	
+	
 	/**
-	 * returns a new Midori_String wrapping the
-	 * value.
+	 * creates a copy of the string and returns it.
 	 * 
-	 * @param string $value
-	 * @return Midori_String another string!!
+	 * &lt;p&gt;Creates a copy of the current unboxed string and 
+	 * returns it.&lt;/p&gt;
+	 * 
+	 * &lt;pre class=&quot;brush: php&quot;&gt;
+	 * 	$string = new Midori_String(&quot;value&quot;);
+	 *  $copy = $string-&gt;copy();
+	 *  echo ($string == $copy)? &quot;true&quot; : &quot;false&quot;; // true
+	 * &lt;/pre&gt;
+	 * 
+	 * @return Midori_String returns a copy of the string.
 	 */
-	public function copy($value)
+	public function copy()
 	{
-		return new Midori_String($value);
+		return new Midori_String($this-&gt;value);
+	}
+	
+
+	/**
+	 * Compares the string value to another value and returns 
+	 * if its this value is less than, equal, or greater than.
+	 * 
+	 * &lt;p&gt;Compares the strings and either returns 0 if the values
+	 * are equal, -1 if the value is less than the value its
+	 * being compared to, or 1 if the value is greater than
+	 * the value its being compared to.&lt;/p&gt;
+	 * 
+	 * &lt;p&gt;This comparsion is helpful for sorting strings alphanumerically.&lt;/p&gt;
+	 * 
+	 * &lt;pre class=&quot;brush: php&quot;&gt;
+	 * 	$string = new Midori_String(&quot;adam&quot;);
+	 *  $valueToCompare = &quot;nathan&quot;;
+	 *  $comparison = $string-&gt;compareTo($valueToCompare);
+	 *  echo $comparsion; // -1 (which is less than)
+	 *  echo $string-&gt;compareTo(&quot;adam&quot;); // 0 (which is equal)
+	 *  echo $string-&gt;compareTo(str(&quot;abba&quot;)); 1 (which is greater than)
+	 * &lt;/pre&gt;
+	 * 
+	 * @param string|Midori_String $value right side of the compare
+	 * @param boolean $ignoreCase should the compre be case insensitive.
+	 * @see strcmp()
+	 * @see strcasecmp()
+	 * @return integer 0 if its equal, -1 if the current value is less than, 1 if its greater than.
+	 */
+	public function compareTo($value, $ignoreCase = false)
+	{
+		if($value instanceof Midori_Nullable)
+			$value = $value-&gt;value;
+		
+		if($ignoreCase){
+			$compare = strcasecmp($this-&gt;value, $value);
+			if($compare &gt; 0)
+				return 1;
+			if($compare === 0)
+				return 0;
+			return -1;
+		}
+		else
+			return strcmp($this-&gt;value, $value); 
+	}
+	
+	
+	
+	
+	/**
+	 * Joins the current string value with the value that
+	 * is being passed to this method. 
+	 * 
+	 * &lt;p&gt;
+	 * This method takes the current string and joins the string 
+	 * that is being passed to the this method to create a new
+	 * string of both values.
+	 * &lt;/p&gt;
+	 * 
+	 * &lt;pre class=&quot;brush: php&quot;&gt;
+	 * 	$array = array(&quot;I have&quot;, &quot; a enumerable object &quot;, &quot;of strings&quot;);
+	 *  $start = new Midori_String(&quot;notice:&quot;);
+	 *  $container = $start-&gt;concat(&quot; this is a text. &quot;);
+	 *  foreach($array as $value)
+	 *    	$container = $container-&gt;concat($value);
+	 *  echo $container; // notice: this is a test. I have a enumerable object of strings
+	 *  echo $start; // notice: 
+	 * &lt;/pre&gt;
+	 * 
+	 * @param mixed $value
+	 * @return Midori_String the concatinated string of both values.
+	 */
+	public function concat($value)
+	{
+		return new Midori_String($this-&gt;value .$value);
 	}
 	
 	/**</diff>
      <filename>src/Midori/String.php</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>cb1ff2fc6d9c02e9c21a8099cf36f4c916a83f5f</id>
    </parent>
  </parents>
  <author>
    <name>U-Michael-PC\Michael</name>
    <email>Michael@Michael-PC.(none)</email>
  </author>
  <url>http://github.com/michaelherndon/midori-php/commit/e949c8591a730dea753fb3ca6d4c30a9999fcfc4</url>
  <id>e949c8591a730dea753fb3ca6d4c30a9999fcfc4</id>
  <committed-date>2009-06-05T21:37:05-07:00</committed-date>
  <authored-date>2009-06-05T21:37:05-07:00</authored-date>
  <message>adding and testing the methods on Midiori_String concat(), compareTo(), and format()</message>
  <tree>16bcbcdfaef8ff6160a6e5b3cb743f0abb11ef19</tree>
  <committer>
    <name>U-Michael-PC\Michael</name>
    <email>Michael@Michael-PC.(none)</email>
  </committer>
</commit>
