This is a search tree for strings I've built for work to back fast type-a-head for AJAX forms, it could be made million times more space efficient but there was no real need for it so.
4 people like thisPosted: 13 years ago by fholm
Fast Concatenated String
2 people like thisPosted: 13 years ago by fholm
Convert string to and from character lists.
11 people like thisPosted: 13 years ago by petebu
General toString and fromString for discriminated unions using FSharp.Reflection
46 people like thisPosted: 13 years ago by Jonas Avelin
When sprintf and String.concat is either too slow or not really what is needed, one can use System.Text.StringBuilder. This snippet makes working with StringBuilder much more convenient and the resulting code more succint.
1 people like thisPosted: 12 years ago by Bent Rasmussen
String split function that skips quoted strings, useful as a simple CSV parser
7 people like thisPosted: 11 years ago by Phillip Trelford
Fold a string with one delimiter except for the last with a different delim. So basically if you have a list ["1";"2";"3"] and you want it to be ["1";",";"2";"and";"3]
1 people like thisPosted: 11 years ago by devshorts
Type extensions for ASCII strings represented as byte arrays. Note: requires the F# 3.1 compiler.
3 people like thisPosted: 10 years ago by Phillip Trelford
Stumbled upon this challenge and tried my hand: http://themechanicalbride.blogspot.com/2009/04/f-solution-to-eric-lippert-challenge.html The original challenge calls for a string result, so there's no issue with converting the sequence to a list from the outset since we need to enumerate it completely anyway; had it insisted on returning a sequence my answer would be different. > commaize ["ABC"; "DEF"; "G"; "H"];; val it : string = "ABC, DEF, G and H"
2 people like thisPosted: 9 years ago by Hugh Gleaves
This checks if a string contains all uppercase characters.
5 people like thisPosted: 6 years ago by LuisFX
Easy way to chunk string into equal segments. Returns a list of string chunks (as opposed to an array or seq of chunks).
7 people like thisPosted: 6 years ago by LSM07
"Please enter the description" - Why'd I do that ?
4 people like thisPosted: 4 years ago by you
Reverse unicode string, who may contains surrogate pairs
2 people like thisPosted: 4 years ago by Enrico Sada
F# Impletementation of StringBuilderCache
1 people like thisPosted: 2 years ago by Pim
Just use the concat
0 people like thisPosted: 10 days ago by Tuomas Hietanen
Simple implementation of the rope data structure, http://en.wikipedia.org/wiki/Rope_(computer_science)
3 people like thisPosted: 13 years ago by fholm
Efficient Immutable String Concat
4 people like thisPosted: 13 years ago by fholm
Concatenates two strings together: ML or OCaml style
2 people like thisPosted: 13 years ago by Cameron Frederick
Higher order function 'withOutStr' to fork console output to a string. The function temporarily redirects Console.Out to a custom TextWriter
5 people like thisPosted: 13 years ago by Jonas Avelin
A random pex4fun puzzle to write a snippet to merge two strings.
2 people like thisPosted: 12 years ago by Joel Huang
See http://stackoverflow.com/questions/18595597/is-using-a-stringbuilder-a-right-thing-to-do-in-f
1 people like thisPosted: 11 years ago by Ramon Snir
String.notNullOrEmpty extension to strings
2 people like thisPosted: 10 years ago by Tuomas Hietanen
Simplistic helpers for formatting dates and strings in a web server (strip HTML tags when reading RSS feeds, nicely format dates etc.)
2 people like thisPosted: 9 years ago by Tomas Petricek
Checks if a string is all in upper-case characters
2 people like thisPosted: 7 years ago by Martin Lockstrom
There is another "All Uppercase" snippet that does two searches - one to verify that there's at least one upper case letter and one to make sure there are no lowercase letters. "---D" is "uppercase" but "---" is not. I wanted to duplicate that behavior even though it seems a bit questionable, but do it in one regex search. The underappreciated lookahead features of RegEx allow this sort of thing - scanning forward and then rescanning forward so I use that here
1 people like thisPosted: 6 years ago by Darrell Plank
Creates a random string of length `n` with characters available in `chars` array.
1 people like thisPosted: 4 years ago by Johan Irvall
This program is a mess, really - just ignore support functions. It'll be great if you can help me tidy up. Here's the passcode: "Passcode". The version of code below may not be original.
3 people like thisPosted: 4 years ago by you
We can use power of computation expressions and InlineIfLambda to get nice syntax and mutable index tracking for allocating strings
3 people like thisPosted: 2 years ago by Evgeniy Andreev
Uses StringBuilder to achieve performance.
2 people like thisPosted: 2 months ago by shazmodan