Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

c# find substring in string

string fullName = "John Doe";
bool nameInFullName = fullName.Contains("John");
// nameInFullName is true
Comment

c# substring find word

  public static string GetSubstring(string l_Source, string l_FindCharacter)
  {
    if (!l_Source.Contains(l_FindCharacter)) return string.Empty;
    int End = l_Source.IndexOf(l_FindCharacter, 0) + l_FindCharacter.Length;
    return l_Source.Substring(0, End - 1);
  }
//string l_Data = GetSubstring("100000.00", "."); //Test //100000
Comment

PREVIOUS NEXT
Code Example
Csharp :: eventsource web api c# 
Csharp :: exe path c# 
Csharp :: top down view player movement 
Csharp :: binding on button c# 
Csharp :: concatanate two lists in c# 
Csharp :: how to pause a console.writeline in C# 
Csharp :: serialize xml as array C# 
Csharp :: unity rollaball 
Csharp :: c# integer part of float 
Csharp :: c# split multiple options 
Csharp :: stop playing audiosource 
Csharp :: unity create a textbox in inspector 
Csharp :: Unlit shader get the direction of camera UNity 
Csharp :: query associative table ef6 
Csharp :: convert video to byte array c# 
Csharp :: cursor position c# 
Csharp :: 2d array rows and columns in c# 
Csharp :: use c#9 
Csharp :: select many vs select 
Csharp :: select top 5 in linq c# 
Csharp :: how to stop timer in c# windows application 
Csharp :: c# datagridview change column alignment 
Csharp :: create enum from int c# 
Csharp :: c# get name of type 
Csharp :: get list of months and year between two dates c# 
Csharp :: loop in c# 
Csharp :: sqlite execute 
Csharp :: string vs string c# 
Csharp :: Moq Unittest with ILogger 
Csharp :: how to c# 
ADD CONTENT
Topic
Content
Source link
Name
2+6 =