¡@

Home 

c# Programming Glossary: substring

Regular Expression to find a string included between two characters, while EXCLUDING the delimiters

http://stackoverflow.com/questions/1454913/regular-expression-to-find-a-string-included-between-two-characters-while-exclu

A simple example should be helpful Target extract the substring between square brackets without returning the brackets themselves...

What are regular expression Balancing Groups?

http://stackoverflow.com/questions/17003799/what-are-regular-expression-balancing-groups

capture stack that is not emptied and then do some substring extraction based on their positions in a separate step. But..

How do I use LINQ Contains(string[]) instead of Contains(string)

http://stackoverflow.com/questions/194930/how-do-i-use-linq-containsstring-instead-of-containsstring

as a string contains all of the values of the array as a substring Even if you did write the extension method the sense of it would..

Is there an alternative to string.Replace that is case-insensitive?

http://stackoverflow.com/questions/244531/is-there-an-alternative-to-string-replace-that-is-case-insensitive

improve this question From MSDN 0 Substitutes the last substring matched by group number number decimal . In .NET Regular expressions..

How do I split a string by strings and include the delimiters using .NET?

http://stackoverflow.com/questions/2484919/how-do-i-split-a-string-by-strings-and-include-the-delimiters-using-net

the solution so far matches split tokens that might be a substring of a larger string. If the split token should be matched completely.. token should be matched completely rather than part of a substring such as a scenario where words in a sentence are used as the..

How do I extract a string of text that lies between two (parenthesis) using .NET?

http://stackoverflow.com/questions/378415/how-do-i-extract-a-string-of-text-that-lies-between-two-parenthesis-using-net

text between the parenthesis how would I do this I suspect substring but I can't work out how to read until the closing bracket the..

Format a date in XML via XSLT

http://stackoverflow.com/questions/500915/format-a-date-in-xml-via-xslt

xsl param name dateTime xsl variable name date select substring before dateTime 'T' xsl variable name year select substring.. before dateTime 'T' xsl variable name year select substring before date ' ' xsl variable name month select substring before.. substring before date ' ' xsl variable name month select substring before substring after date ' ' ' ' xsl variable name day select..

If strings are immutable in .NET, then why does Substring take O(n) time?

http://stackoverflow.com/questions/6742923/if-strings-are-immutable-in-net-then-why-does-substring-take-on-time

they have been designed such that string.Substring takes O substring.Length time instead of O 1 i.e. what were the tradeoffs if any.. of O 1 i.e. what were the tradeoffs if any c# .net string substring time complexity share improve this question UPDATE I liked.. is O 1 if n does not grow large. Most people extract tiny substrings from tiny strings so how the complexity grows asymptotically..

Parse C# string to DateTime

http://stackoverflow.com/questions/7580809/parse-c-sharp-string-to-datetime

create a DateTime object from that string. As of now I use substring and do it like this string date 250920111414 int year Convert.ToInt32.. Is it possible to use string format to do the same without substring c# .net string datetime format share improve this question..

Read fixed width record from text file

http://stackoverflow.com/questions/162727/read-fixed-width-record-from-text-file

approach would be to parse each record simply using string.Substring . Is there a better way For example the format could be described.. to make sure I'm not overlooking a more elegant way than Substring . Update I ultimately went with a regex like Killersponge suggested.. .net parsing fixed width share improve this question Substring sounds good to me. The only downside I can immediately think..

How do convert unicode escape sequences to unicode characters in a .NET string

http://stackoverflow.com/questions/183907/how-do-convert-unicode-escape-sequences-to-unicode-characters-in-a-net-string

rxx.Replace result match char Int32.Parse match.Value.Substring 2 NumberStyles.HexNumber .ToString Example 2 Regex rx new Regex.. delegate Match match return char Int32.Parse match.Value.Substring 2 NumberStyles.HexNumber .ToString The first example shows the.. escape is processed like this char Int32.Parse match.Value.Substring 2 NumberStyles.HexNumber .ToString Get the string representing..

ObjectContext.GetObjectType(e.GetType()) not returning the entity type of the POCO entity

http://stackoverflow.com/questions/18765294/objectcontext-getobjecttypee-gettype-not-returning-the-entity-type-of-the-po

Surely I shouldn't have to use Substring here name name.Substring 0 name.IndexOf _ .ToSpacedTitleCase.. Surely I shouldn't have to use Substring here name name.Substring 0 name.IndexOf _ .ToSpacedTitleCase string message name deleted..

How to get the substring in C#?

http://stackoverflow.com/questions/2902394/how-to-get-the-substring-in-c

I get the output of the last five characters Three with Substring function. Or other string function will be used Thank you. static.. OneTwoThree Get first three characters string sub input.Substring 0 3 Console.WriteLine Substring 0 sub Output One. c# string.. string sub input.Substring 0 3 Console.WriteLine Substring 0 sub Output One. c# string share improve this question..

Strong password regex

http://stackoverflow.com/questions/3131025/strong-password-regex

is allowed to appear more than two times in a row. Substring aa is okay aaa is not. Make it . . 1 1 to reject repeated substrings..

string split in c#

http://stackoverflow.com/questions/4207374/string-split-in-c-sharp

of strings. It won't be as fast as using LastIndexOf and Substring manually but it's a ton easier to read and maintain IMO. share..

If strings are immutable in .NET, then why does Substring take O(n) time?

http://stackoverflow.com/questions/6742923/if-strings-are-immutable-in-net-then-why-does-substring-take-on-time

strings are immutable in .NET then why does Substring take O n time Given that strings are immutable in .NET I'm.. I'm wondering why they have been designed such that string.Substring takes O substring.Length time instead of O 1 i.e. what were..

How can you get the first digit in an int (C#)?

http://stackoverflow.com/questions/701322/how-can-you-get-the-first-digit-in-an-int-c

back to an int. int start Convert.ToInt32 curr.ToString .Substring 0 1 While this does the job it feels like there is probably.. irrespective of speed differences mystring 0 instead of Substring is still just string manipulation c# share improve this question..