Answers for "c# get first word of string"

C#
4

c# get first 5 characters of string

string result = str.Substring(0,5);
Posted by: Guest on August-20-2020
0

get first number in string C#

var input = "12985bwevgjb9812";
string firstDigit = new String(input.TakeWhile(Char.IsDigit).ToArray());
Posted by: Guest on September-04-2020
0

c# get first word of string

var input = "Hello, World";
var output = Regex.Replace(input.Split()[0], @"[^0-9a-zA-Z\ ]+", "");
Posted by: Guest on September-25-2021

Code answers related to "c# get first word of string"

C# Answers by Framework

Browse Popular Code Answers by Language