Home
|
Misc
|
Run Code
|
Code Wall
|
Users
|
Feedback
|
Login
run code
Language:
Assembly
C#
C++
C
Common Lisp
F#
Go
Haskell
Java
Javascript
Lua
Node.js
Objective-C
Pascal
Perl
Php
Prolog
Python
Python 3
Ruby
Scala
Scheme
Sql Server
Visual Basic
Editor:
CodeMirror
EditArea
Simple
//Title of this code //Rextester.Program.Main is the entry point for your code. Don't change it. using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; using System.Text; namespace Rextester { public class Program { public static void Main(string[] args) { String myString = "hello 0 goodbye 0 clowns are cool 0"; var strings = myString.Split('0'); var replaced = new StringBuilder(strings[0]); for (var i = 1; i < strings.Length; ++i) { replaced.Append("REPLACED " + i.ToString()); replaced.Append(strings[i]); } Console.WriteLine(replaced.ToString()); } } }
Show compiler warnings
[
+
]
Show input
Compilation time: 0.25 sec, absolute running time: 0.08 sec, cpu time 0.06 sec, average memory usage: 9 Mb, average nr of threads: 3
edit mode
|
history
hello REPLACED 1 goodbye REPLACED 2 clowns are cool REPLACED 3