goprotobuf: Add MarshalTextString helper function.

R=r
CC=golang-dev
http://codereview.appspot.com/5823043
diff --git a/proto/text.go b/proto/text.go
index 9848858..d781c68 100644
--- a/proto/text.go
+++ b/proto/text.go
@@ -423,6 +423,13 @@
 // Values that are not protocol buffers can also be written, but their formatting is not guaranteed.
 func MarshalText(w io.Writer, pb interface{}) { marshalText(w, pb, false) }
 
+// MarshalTextString is the same as MarshalText, but returns the string directly.
+func MarshalTextString(pb interface{}) string {
+	var buf bytes.Buffer
+	marshalText(&buf, pb, false)
+	return buf.String()
+}
+
 // CompactText writes a given protocl buffer in compact text format (one line).
 // Values that are not protocol buffers can also be written, but their formatting is not guaranteed.
 func CompactText(w io.Writer, pb interface{}) { marshalText(w, pb, true) }