private void AppendJoiner(string joiner) { if (Title.Length > 0) { Title.Append(joiner); } }
/// <summary> /// Append a space to the text of this TitleString obj if, and only if, there is some existing text /// i.e., a space is only added to existing text and will not create a text entry consisting of only one /// space /// </summary> /// <returns> /// a reference to the called object (itself) /// </returns> public TitleBuilder AppendSpace() { if (Title.Length > 0) { Title.Append(Space); } return(this); }
/// <summary> /// Concatenate the the Title value (the result of calling an objects Title() method), or the specified /// default value if the Title is equal to null or is empty, to this TitleString object. /// </summary> /// <param name="obj">the naked obj to get a Title from</param> /// <param name="defaultValue">the default text to use when the naked obj is null</param> /// <param name="format"></param> /// <returns> /// a reference to the called object (itself) /// </returns> public TitleBuilder Concat(object obj, string format, string defaultValue) { if (IsEmpty(obj, format)) { Title.Append(defaultValue); } else { Title.Append(TitleOrToString(obj, format)); } return(this); }
/// <summary> /// Concatenate the specified text on to the end of the text of this TitleString /// </summary> /// <param name="text">text to Append</param> /// <returns> /// a reference to the called object (itself) /// </returns> public TitleBuilder Concat(string text) { Title.Append(text); return(this); }
private void AppendWithSpace(object obj, string format) { AppendSpace(); Title.Append(TitleOrToString(obj, format)); }
private void AppendWithSpace(string str) { AppendSpace(); Title.Append(str); }