Functional programming operators for string processing. Further string operations are available via the member functions on strings and other functionality in System.String and System.Text.RegularExpressions types.
Function or value | Description | ||
|
![]() ![]() ![]() ![]() ![]() ![]()
Builds a new string whose characters are the results of applying the function
ExampleThe following samples shows how to interspace spaces in a text
The sample evaluates to "S t e f a n s a y s : H i ! "
ExampleHow to show the ASCII representation of a very secret text
The sample evaluates to "83 101 99 114 101 116 "
|
||
Full Usage:
String.concat sep strings
Parameters:
string
-
The separator string to be inserted between the strings
of the input sequence.
strings : seq<string>
-
The sequence of strings to be concatenated.
Returns: string
A new string consisting of the concatenated strings separated by
the separation string.
|
![]() ![]() ![]() ![]() ![]() ![]()
Returns a new string made by concatenating the given strings
with separator
Example
|
||
|
ExampleLooking for uppercase characters
|
||
|
![]() ![]() ![]() ![]() ![]() ![]() Builds a new string containing only the characters of the input string for which the given predicate returns "true". Returns an empty string if the input string is null
ExampleFiltering out just alphanumeric characters
ExampleFiltering out just digits
|
||
|
ExampleLooking for lowercase characters
|
||
|
![]() ![]() ![]() ![]() ![]() ![]()
Builds a new string whose characters are the results of applying the function
ExampleEnumerate digits ASCII codes
The sample evaluates to: "48 49 50 51 52 53 54 55 56 57 "
|
||
|
ExamplePrinting the ASCII code for each characater in the string
The sample evaluates as unit , but prints:
|
||
|
ExampleNumbering the characters and printing the associated ASCII code for each characater in the input string
The sample evaluates as unit , but prints:
|
||
|
ExampleGetting the length of different strings
|
||
|
![]() ![]() ![]() ![]() ![]() ![]()
Builds a new string whose characters are the results of applying the function
ExampleChanging case to upper for all characters in the input string
|
||
![]() ![]() ![]() ![]() ![]() ![]()
Builds a new string whose characters are the results of applying the function
Example
Evaluates to [ (0, 'O'); (1, 'K'); (2, '!') ] .
|
|||
|
Example
Evaluates to "Do it!Do it!Do it!" .
|