I want to know if there exists a simple method for removing the last line from a StringBuilder object without knowing the number of characters in the last line.
Example:
Hello, how are you?
Fine thanks!
Ok, Perfect...
I want to remove "Ok, Perfect..."
http://ideone.com/9k8Tcj
EDIT: If you want to remove the last non-empty line do
http://ideone.com/AlzQe0