Advertisement
Guest User

Untitled

a guest
Apr 25th, 2014
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.38 KB | None | 0 0
  1. "Its" "Suposed" "To" "Be" "Like" "This"
  2.  
  3. protected void btnSend_Click(object sender, EventArgs e)
  4. {
  5. string[] words = txtText.Text.Split(' ');
  6. foreach (string word in words)
  7. {
  8. string test = word.Replace(word, '"' + word + '"');
  9.  
  10. }
  11. lblText.Text = words.ToString();
  12. }
  13.  
  14. lblText.Text = Regex.Replace(lblText.Text, @"w+", ""$0"")
  15.  
  16. lblText.Text = Regex.Replace(lblText.Text, @"S+", ""$0"")
  17.  
  18. protected void btnSend_Click(object sender, EventArgs e)
  19. {
  20. string[] words = txtText.Text.Split(' ');
  21. foreach (string word in words)
  22. {
  23. string test = word.Replace(word, '"' + word + '"');
  24. }
  25. lblText.Text = words.ToString();
  26. }
  27.  
  28. protected void btnSend_Click(object sender, EventArgs e)
  29. {
  30. string[] words = txtText.Text.Split(' ');
  31. string test = String.Empty;
  32. foreach (string word in words)
  33. {
  34. test += word.Replace(word, '"' + word + '"');
  35. }
  36. lblText.Text = test.ToString();
  37. }
  38.  
  39. string input ="It's going to be a fine day";
  40. string[] words = input.Split(' ');
  41. string result = String.Empty;
  42. foreach (string word in words)
  43. {
  44. result += String.Format(""" + word + "" ");
  45.  
  46. }
  47.  
  48. protected void btnSend_Click(object sender, EventArgs e)
  49. {
  50. string test = String.Empty;
  51. string[] words = txtText.Text.Split(' ');
  52. foreach (string word in words)
  53. {
  54. test += String.Format(""" + word + "" ");
  55.  
  56. }
  57. lblText.Text = test;
  58. }
  59.  
  60. return String.Join(" ", txtTextText.Split(' ').Select( word => """ + word """));
  61.  
  62. lblText.Text = String.Join(" ", txtText.Text.Split(' ').Select(x => """ + x + """));
  63.  
  64. List<string> list = new List<string>();
  65. int i = 0;
  66. yourStringArray.ToList().ForEach(x => list.Add(string.Format("'{0}'", yourStringArray[i++])));
  67.  
  68. string txtText = "this is a string";
  69. string[] words = txtText.Split(' ');
  70. txtText = @"""" + string.Join(@"""", words) + @"""";
  71.  
  72. "this"is"a"string"
  73.  
  74. protected void btnSend_Click(object sender, EventArgs e)
  75. {
  76. string input = "It's going to be a fine day";
  77. string[] words = input.Split(' ');
  78. StringBuilder sb = new StringBuilder();
  79. foreach (string word in words)
  80. {
  81. if (!string.IsNullOrEmpty(word))
  82. {
  83. sb.Append(""");
  84. sb.Append(word);
  85. sb.Append("" ");
  86. }
  87. }
  88. lblText.Text = sb.ToString();
  89. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement