Click here to Skip to main content
15,894,405 members
Articles / Programming Languages / C#

StringBuilderPlus Improves Upon StringBuilder

Rate me:
Please Sign up or sign in to vote.
4.85/5 (62 votes)
1 Jun 2011CPOL9 min read 143.2K   807   88  
StringBuilderPlus facilitates prefixing and suffixing strings and StringBuilderPluses in an efficient manner.
namespace StringBuilderPlus_Tester
{
	partial class FormBuilderTest
	{
		/// <summary>
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.IContainer components = null;

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
		protected override void Dispose(bool disposing)
		{
			if (disposing && (components != null))
			{
				components.Dispose();
			}
			base.Dispose(disposing);
		}

		#region Windows Form Designer generated code

		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			this.splitContainer1 = new System.Windows.Forms.SplitContainer();
			this.btnLargeBuilder = new System.Windows.Forms.Button();
			this.btnLargeString = new System.Windows.Forms.Button();
			this.label1 = new System.Windows.Forms.Label();
			this.txtLength = new System.Windows.Forms.TextBox();
			this.btnDuplicate = new System.Windows.Forms.Button();
			this.txtPrefix = new System.Windows.Forms.Button();
			this.txtClear = new System.Windows.Forms.Button();
			this.txtFlatten = new System.Windows.Forms.Button();
			this.txtSuffix = new System.Windows.Forms.Button();
			this.txtString = new System.Windows.Forms.TextBox();
			this.txtResult = new System.Windows.Forms.TextBox();
			this.splitContainer1.Panel1.SuspendLayout();
			this.splitContainer1.Panel2.SuspendLayout();
			this.splitContainer1.SuspendLayout();
			this.SuspendLayout();
			// 
			// splitContainer1
			// 
			this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
			this.splitContainer1.Location = new System.Drawing.Point(0, 0);
			this.splitContainer1.Name = "splitContainer1";
			this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
			// 
			// splitContainer1.Panel1
			// 
			this.splitContainer1.Panel1.Controls.Add(this.btnLargeBuilder);
			this.splitContainer1.Panel1.Controls.Add(this.btnLargeString);
			this.splitContainer1.Panel1.Controls.Add(this.label1);
			this.splitContainer1.Panel1.Controls.Add(this.txtLength);
			this.splitContainer1.Panel1.Controls.Add(this.btnDuplicate);
			this.splitContainer1.Panel1.Controls.Add(this.txtPrefix);
			this.splitContainer1.Panel1.Controls.Add(this.txtClear);
			this.splitContainer1.Panel1.Controls.Add(this.txtFlatten);
			this.splitContainer1.Panel1.Controls.Add(this.txtSuffix);
			this.splitContainer1.Panel1.Controls.Add(this.txtString);
			// 
			// splitContainer1.Panel2
			// 
			this.splitContainer1.Panel2.Controls.Add(this.txtResult);
			this.splitContainer1.Size = new System.Drawing.Size(757, 432);
			this.splitContainer1.SplitterDistance = 214;
			this.splitContainer1.TabIndex = 6;
			// 
			// btnLargeBuilder
			// 
			this.btnLargeBuilder.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
			this.btnLargeBuilder.AutoSize = true;
			this.btnLargeBuilder.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
			this.btnLargeBuilder.Location = new System.Drawing.Point(162, 188);
			this.btnLargeBuilder.Name = "btnLargeBuilder";
			this.btnLargeBuilder.Size = new System.Drawing.Size(85, 23);
			this.btnLargeBuilder.TabIndex = 14;
			this.btnLargeBuilder.Text = "Large Builder+";
			this.btnLargeBuilder.UseVisualStyleBackColor = true;
			this.btnLargeBuilder.Click += new System.EventHandler(this.btnLargeBuilder_Click);
			// 
			// btnLargeString
			// 
			this.btnLargeString.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
			this.btnLargeString.AutoSize = true;
			this.btnLargeString.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
			this.btnLargeString.Location = new System.Drawing.Point(82, 188);
			this.btnLargeString.Name = "btnLargeString";
			this.btnLargeString.Size = new System.Drawing.Size(74, 23);
			this.btnLargeString.TabIndex = 14;
			this.btnLargeString.Text = "Large String";
			this.btnLargeString.UseVisualStyleBackColor = true;
			this.btnLargeString.Click += new System.EventHandler(this.btnLargeString_Click);
			// 
			// label1
			// 
			this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
			this.label1.AutoSize = true;
			this.label1.Location = new System.Drawing.Point(665, 193);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(80, 13);
			this.label1.TabIndex = 13;
			this.label1.Text = "characters long";
			// 
			// txtLength
			// 
			this.txtLength.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
						| System.Windows.Forms.AnchorStyles.Right)));
			this.txtLength.Location = new System.Drawing.Point(253, 190);
			this.txtLength.Name = "txtLength";
			this.txtLength.ReadOnly = true;
			this.txtLength.Size = new System.Drawing.Size(406, 20);
			this.txtLength.TabIndex = 12;
			this.txtLength.Text = "0";
			this.txtLength.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
			// 
			// btnDuplicate
			// 
			this.btnDuplicate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
			this.btnDuplicate.AutoSize = true;
			this.btnDuplicate.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
			this.btnDuplicate.Location = new System.Drawing.Point(14, 188);
			this.btnDuplicate.Name = "btnDuplicate";
			this.btnDuplicate.Size = new System.Drawing.Size(62, 23);
			this.btnDuplicate.TabIndex = 11;
			this.btnDuplicate.Text = "Duplicate";
			this.btnDuplicate.UseVisualStyleBackColor = true;
			this.btnDuplicate.Click += new System.EventHandler(this.btnDuplicate_Click);
			// 
			// txtPrefix
			// 
			this.txtPrefix.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
			this.txtPrefix.AutoSize = true;
			this.txtPrefix.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
			this.txtPrefix.Location = new System.Drawing.Point(14, 159);
			this.txtPrefix.Name = "txtPrefix";
			this.txtPrefix.Size = new System.Drawing.Size(43, 23);
			this.txtPrefix.TabIndex = 10;
			this.txtPrefix.Text = "Prefix";
			this.txtPrefix.UseVisualStyleBackColor = true;
			this.txtPrefix.Click += new System.EventHandler(this.txtPrefix_Click);
			// 
			// txtClear
			// 
			this.txtClear.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
			this.txtClear.AutoSize = true;
			this.txtClear.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
			this.txtClear.Location = new System.Drawing.Point(167, 159);
			this.txtClear.Name = "txtClear";
			this.txtClear.Size = new System.Drawing.Size(41, 23);
			this.txtClear.TabIndex = 9;
			this.txtClear.Text = "Clear";
			this.txtClear.UseVisualStyleBackColor = true;
			this.txtClear.Click += new System.EventHandler(this.txtClear_Click);
			// 
			// txtFlatten
			// 
			this.txtFlatten.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
			this.txtFlatten.AutoSize = true;
			this.txtFlatten.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
			this.txtFlatten.Location = new System.Drawing.Point(112, 159);
			this.txtFlatten.Name = "txtFlatten";
			this.txtFlatten.Size = new System.Drawing.Size(49, 23);
			this.txtFlatten.TabIndex = 8;
			this.txtFlatten.Text = "Flatten";
			this.txtFlatten.UseVisualStyleBackColor = true;
			this.txtFlatten.Click += new System.EventHandler(this.txtFlatten_Click);
			// 
			// txtSuffix
			// 
			this.txtSuffix.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
			this.txtSuffix.AutoSize = true;
			this.txtSuffix.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
			this.txtSuffix.Location = new System.Drawing.Point(63, 159);
			this.txtSuffix.Name = "txtSuffix";
			this.txtSuffix.Size = new System.Drawing.Size(43, 23);
			this.txtSuffix.TabIndex = 7;
			this.txtSuffix.Text = "Suffix";
			this.txtSuffix.UseVisualStyleBackColor = true;
			this.txtSuffix.Click += new System.EventHandler(this.txtSuffix_Click);
			// 
			// txtString
			// 
			this.txtString.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
						| System.Windows.Forms.AnchorStyles.Left)
						| System.Windows.Forms.AnchorStyles.Right)));
			this.txtString.Location = new System.Drawing.Point(12, 12);
			this.txtString.Multiline = true;
			this.txtString.Name = "txtString";
			this.txtString.ScrollBars = System.Windows.Forms.ScrollBars.Both;
			this.txtString.Size = new System.Drawing.Size(733, 141);
			this.txtString.TabIndex = 6;
			this.txtString.WordWrap = false;
			// 
			// txtResult
			// 
			this.txtResult.Dock = System.Windows.Forms.DockStyle.Fill;
			this.txtResult.Location = new System.Drawing.Point(0, 0);
			this.txtResult.Multiline = true;
			this.txtResult.Name = "txtResult";
			this.txtResult.ReadOnly = true;
			this.txtResult.ScrollBars = System.Windows.Forms.ScrollBars.Both;
			this.txtResult.Size = new System.Drawing.Size(757, 214);
			this.txtResult.TabIndex = 2;
			this.txtResult.WordWrap = false;
			// 
			// FormBuilderTest
			// 
			this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
			this.ClientSize = new System.Drawing.Size(757, 432);
			this.Controls.Add(this.splitContainer1);
			this.Name = "FormBuilderTest";
			this.ShowIcon = false;
			this.Text = "StringBuilder+ Tester";
			this.splitContainer1.Panel1.ResumeLayout(false);
			this.splitContainer1.Panel1.PerformLayout();
			this.splitContainer1.Panel2.ResumeLayout(false);
			this.splitContainer1.Panel2.PerformLayout();
			this.splitContainer1.ResumeLayout(false);
			this.ResumeLayout(false);

		}

		#endregion

		private System.Windows.Forms.SplitContainer splitContainer1;
		private System.Windows.Forms.Button txtPrefix;
		private System.Windows.Forms.Button txtClear;
		private System.Windows.Forms.Button txtFlatten;
		private System.Windows.Forms.Button txtSuffix;
		private System.Windows.Forms.TextBox txtString;
		private System.Windows.Forms.TextBox txtResult;
		private System.Windows.Forms.Button btnDuplicate;
		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.TextBox txtLength;
		private System.Windows.Forms.Button btnLargeBuilder;
		private System.Windows.Forms.Button btnLargeString;

	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Web Developer
United States United States

  • Managing Your JavaScript Library in ASP.NET (if you work with ASP.net and you don't read that, you are dead to me).
  • Graduated summa cum laude with a BS in Computer Science.
  • Wrote some articles and some tips.
  • DDR ("New high score? What does that mean? Did I break it?"), ping pong, and volleyball enthusiast.
  • Software I have donated to (you should too):

Comments and Discussions