static void Main() { var ft = new FormattedText("This is a brave new world"); ft.Capitalize(10, 15); WriteLine(ft); var bft = new BetterFormattedText("This is a brave new world"); bft.GetRange(10, 15).Capitalize = true; WriteLine(bft); }
private static void TextFormatting() { var ft = new FormattedText("This is a brave new world"); ft.Capitalize(10, 15); Console.WriteLine(ft); var bft = new BetterFormattedText("This is a brave new world"); bft.GetRange(10, 15).Capitalize = true; Console.WriteLine(bft); }
static void Main(string[] args) { var ft = new FormattedText("this is a new world"); ft.Capitalize(5, 8); Console.WriteLine(ft.ToString()); var bft = new BetterFormattedText("this is a new world"); bft.GetRange(5, 8).Capitalize = true; Console.WriteLine(bft); }
static void Main(string[] args) { var ft = new FormattedText("This is a brave new world"); ft.Capitalize(10, 15); WriteLine(ft); var bft = new BetterFormattedText("This is a brave new world"); bft.GetRange(10, 15).Capitalize = true; WriteLine(bft); var sentence = new Sentence("Hello world"); sentence[1].Capitalize = true; WriteLine(sentence); }