About 13,000,000 results
Open links in new tab
  1. c# - string split by index / params? - Stack Overflow

    public static string[] SplitAt(this string text, params int[] indexes) { var pattern = new StringBuilder(); var lastIndex = 0; foreach (var index in indexes) { …

  2. indexing - how to split string by position c# - Stack Overflow

    Feb 21, 2022 · I have a text string that when it exceeds a specific length, I separate the string into 2 strings, passing the rest of the remaining content to another variable, but I have an exception …

  3. Splitting a string in c# and accessing data at a certain index

    May 11, 2015 · Try to split -- and take the First() element from list. On that element do a split at : and take the second element ([1]). As @steve sugested you can do split only 1 time at ' ', if …

  4. Divide strings using String.Split - C# | Microsoft Learn

    The Split method returns an array of strings split from a set of delimiters. It's an easy way to extract substrings from a string.

  5. Different Ways to Split a String in C# - Code Maze

    Apr 14, 2023 · Split a String Based on String[] With Options. We use the Split method with String[] and StringSplitOptions options to split a string based on an array of string delimiters while …

    Missing:

    • Index

    Must include:

  6. C# String Split () Method - GeeksforGeeks

    Mar 26, 2025 · This method is used to split a string into a maximum number of substrings based on the characters in an array. We can also specify the maximum number of substrings to …

  7. String.Split Method (System) | Microsoft Learn

    To split a string at a separator character, use the IndexOf or IndexOfAny method to locate a separator character in the string. To split a string at a separator string, use the IndexOf or …

  8. Separate strings into substrings - .NET | Microsoft Learn

    Sep 15, 2021 · Use the IndexOf and Substring methods in conjunction when you don't want to extract all of the substrings in a string. String.Split provides a handful of overloads to help you …

  9. How To Split String In C# (Basic & Advanced Tutorial) - ByteHide

    May 7, 2023 · The String.Split method in C# is a powerful and versatile tool used for dividing strings based on specified delimiters. This method relies on delimiter characters to break a …

  10. c# - Splitting strings at specific positions - Stack Overflow

    String.Substring is the way to go, it certainly won't be faster with regular expressions... int startPos = 0; for (int i = 0; i < lengths.Length; i++) parts[i] = line.Substring(startPos, lengths[i]); startPos …

  11. Some results have been removed
Refresh