How to make it so that, if I have too much text to fit into the Text gameobject, then earlier lines of text will be removed in favour of new lines?

So I’m in the process of getting a chat system going for a game I’m working on. But I have an issue where, if there are too many lines in the chatlog (e.g. 31 lines of text when the Text gameobject can only fit 30) then the bottom lines won’t show up (so it shows lines 1-30, but not 31). How can I make it cut off the earlier lines of text instead (so that it shows lines 2-31 but not line 1)? Should I do something along the lines of (pseudocode):

if(characterCount > maxCharCount)
{
    chalogText -= <all the text up to (characterCount-maxCharCount)>
}

The above would probably work, with some refinement, but is there a more efficient method?

Have a look at this simple script:

using UnityEngine;
using System.Collections;

public class textfieldtest : MonoBehaviour {
	public GUISkin skin1;
	private string stringToEdit = "";

	void OnGUI () {
		GUI.skin = skin1;
		stringToEdit = GUI.TextArea(new Rect(10, 10, 200,50), stringToEdit);
		if(GUI.changed){
			if (stringToEdit.Length>100) stringToEdit = stringToEdit.Substring(1);
		}
		GUI.TextField (new Rect (10, 210, 200, 100), stringToEdit, "textarea");

	}
}

if that is what you are after.
Although this is based on TextArea and characters count, not lines count.