How to concatenate string replace in C#

1 Answer

0 votes
using System;

public class Program
{
	private static string concatenate_replace(string str) {
		str = str.Substring(3).Replace("high", "HIGH").Replace("level", "");

		return str;
	}

	public static void Main(string[] args)
	{
		string str = "C# is a general-purpose high-level programming language";

		str = concatenate_replace(str);

		Console.Write(str);
	}
}





/*
run:
   
is a general-purpose HIGH- programming language
   
*/

 



answered Dec 9, 2023 by avibootz

Related questions

1 answer 221 views
1 answer 229 views
1 answer 214 views
1 answer 174 views
174 views asked Dec 9, 2023 by avibootz
1 answer 230 views
1 answer 250 views
1 answer 201 views
...