Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

remove all text after string c#

string input = "text?here";
int index = input.LastIndexOf("?"); // Character to remove "?"
if (index > 0)
    input = input.Substring(0, index); // This will remove all text after character ?
Comment

remove all letters from string c#

// add directive at the top 
using System.Text.RegularExpressions;

string numberOnly = Regex.Replace(s, "[^0-9.]", "")
Comment

PREVIOUS NEXT
Code Example
Csharp :: unity create button with parameter 
Csharp :: Unity Scene Load by Name 
Csharp :: public vs internal c# 
Csharp :: check if ienumerable is empty c# 
Csharp :: c# create datatable 
Csharp :: get all devices in game unity 
Csharp :: axwmp balance c# 
Csharp :: link nuttom in c# 
Csharp :: unity keep rotating object 
Csharp :: c# conver date utc to cst 
Csharp :: how to make a quit button in unity 
Csharp :: unity mesh showing Instance 
Csharp :: c# check if string is directory 
Csharp :: add leading zeroes in c# 
Csharp :: c# get calling method name 
Csharp :: c# regex number only 
Csharp :: c# random string 
Csharp :: monogame fullscreen 
Csharp :: unity get a position inside sphere 
Csharp :: unity get textmesh pro component 
Csharp :: how to check is object by this type c# 
Csharp :: c# separate string by comma 
Csharp :: unity get child 
Csharp :: c# int positive only 
Csharp :: c# reading months as int 
Csharp :: unity detect any key 
Csharp :: remove first character in a string c# 
Csharp :: c# iterate over a dictionary 
Csharp :: unity how to stop the game 
Csharp :: unity set material 
ADD CONTENT
Topic
Content
Source link
Name
6+5 =