Determining whether the string of characters are the same

 

. 1  ///  <Summary> 
2  ///   determines whether the character string of the same characters as all aaaa bbb a composition consisting of all ccc b all c component
 . 3  ///  </ Summary> 
. 4  / //  <param name = "S"> </ param> 
. 5  ///  <Returns> </ Returns> 
. 6  public  BOOL IsSameString ( String S)
 . 7  {
 . 8      BOOL Result = to false ;
 . 9      for ( int I = 0 ; I <s.Length; I ++ )
 10      {
 . 11          String A = S [ 0 ] .ToString ();
 12 is         if (a != s[i].ToString())
13         {
14             result = false;
15         }
16         else
17         {
18             result = true;
19         }
20     }
21     return result;
22 }

Guess you like

Origin www.cnblogs.com/xe2011/p/11494917.html