From WikiChip
Difference between revisions of "string manipulation"
m |
|||
(One intermediate revision by the same user not shown) | |||
Line 19: | Line 19: | ||
| style="width:5%; font-size:95%; vertical-align: top;" | | | style="width:5%; font-size:95%; vertical-align: top;" | | ||
− | * [[ | + | * [[algol/string manipulation|ALGOL]] |
− | * [[ | + | * [[c sharp/string manipulation|C Sharp]] |
− | * | + | * {{C|string handling|C}} |
− | * [[ | + | * [[c++/string manipulation|C++]] |
− | * [[ | + | * [[delphi/string manipulation|Delphi]] |
| style="width:5%; font-size:95%; vertical-align:top;" | | | style="width:5%; font-size:95%; vertical-align:top;" | | ||
− | * [[ | + | * [[go/string manipulation|Go]] |
− | * [[ | + | * [[haskell/string manipulation|Haskell]] |
− | * [[ | + | * [[java/string manipulation|Java]] |
− | * [[ | + | * [[javascript/string manipulation|JavaScript]] |
− | * [[ | + | * [[lua/string manipulation|Lua]] |
| style="width:5%; font-size:95%; vertical-align:top;" | | | style="width:5%; font-size:95%; vertical-align:top;" | | ||
− | * | + | * {{mIRC|string manipulation|mIRC}} |
− | * [[ | + | * [[php/string manipulation|PHP]] |
− | * [[ | + | * [[python/string manipulation|Python]] |
− | * [[ | + | * [[ruby/string manipulation|Ruby]] |
|} | |} |
Latest revision as of 10:08, 4 January 2015
String manipulation (or string handling) is the process of changing, parsing, splicing, pasting, or analyzing strings. String manipulation typically comes as a mechanism or a library feature of in most programming languages.
Typically, most programming languages provide a string data type that holds a sequence of characters. Such types often expose a set of functions and various other low-level functionality for manipulating the contained characters.
Common operations[edit]
- Concatenation is the process of joining two strings together into a single string. For example "
race
" concatenated with "car
" results in "racecar
". - Splitting is the process of breaking down a string into multiple strings according to a certain delimiter or rule (e.g. regex pattern). For example "
A B C
" could be split into three separate strings, ("A
", "B
", "C
"), using the space character as a delimiter. - Substrings is the process of extracting a portion of the string from a bigger string. Such operations typically involve a starting offset and a length. For example, one possible substring of "
apples
" is "pp
". - Case conversion is the process of converting a string into a specific case for example into all lowercase or titlecase.
- Searching is the process of searching for a specific pattern in a string.
In various languages[edit]
Most programming languages provide a built-in mechanism or library functions for manipulating strings.
|