Created
          April 3, 2009 13:15 
        
      - 
      
- 
        Save jpemberthy/89745 to your computer and use it in GitHub Desktop. 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | function StripString(str : String){ | |
| str = str.Trim(); | |
| var strOrganized : String = ""; | |
| var addSpace : boolean = true; | |
| for(var i = 0; i < str.length; i++){ | |
| if(str[i] == " "){ | |
| if(addSpace){ | |
| addSpace = false; | |
| strOrganized += str[i]; | |
| } | |
| } else { | |
| strOrganized += str[i]; | |
| addSpace = true; | |
| } | |
| } | |
| return strOrganized; | |
| } | |
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment