StringUtils

Kind of class: public class
Package:
Inherits from:
  • none
Author: John Polacek, john@johnpolacek.com
Classpath: com.johnpolacek.utils.StringUtils
File last modified: Tuesday, 24 Augustus 2010, 17:26:45
Utilities for working with Strings

Summary

Class methods
  • toTitleCase (str:String) : String
    • Capitalizes the initial character of each word of a given string.
  • toInitialCap (original:String) : String
    • Capitalizes the initial character of the given string.
  • getFileExtension (fileName:String) : String
    • Returns the characters after the last (.) of a given string (e.g.
  • removeLineBreaks (txt:String) : String
    • Removes line breaks from string and then returns the string.

Class methods

getFileExtension

static function getFileExtension(fileName:String) : String

Returns the characters after the last (.) of a given string (e.g. .jpg).

removeLineBreaks

static function removeLineBreaks(txt:String) : String

Removes line breaks from string and then returns the string.

toInitialCap

static function toInitialCap(original:String) : String

Capitalizes the initial character of the given string.

toTitleCase

static function toTitleCase(str:String) : String

Capitalizes the initial character of each word of a given string.