From WikiChip
Editing string manipulation

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

This page supports semantic in-text annotations (e.g. "[[Is specified as::World Heritage Site]]") to build structured and queryable content provided by Semantic MediaWiki. For a comprehensive description on how to use annotations or the #ask parser function, please have a look at the getting started, in-text annotation, or inline queries help pages.

Latest revision Your text
Line 1: Line 1:
'''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 language]]s.
+
'''String manipulation''' (or '''string handling''') is a mechanism or a library feature of most [[programming language]]s that provides the capabilities of performing various operations on [[string]]s. Typically such operations include performing basic tasks such as concatenation, copying, tokenization, searching, and replacing.
  
 
Typically, most programming languages provide a [[string]] [[data type]] that holds a sequence of characters. Such types often expose a set of [[function]]s and various other low-level functionality for manipulating the contained characters.
 
Typically, most programming languages provide a [[string]] [[data type]] that holds a sequence of characters. Such types often expose a set of [[function]]s and various other low-level functionality for manipulating the contained characters.
  
== Common operations ==
+
Below is a summary of various string manipulation facilities in different languages.
  
*'''[[Concatenation - string manipulation|Concatenation]]''' is the process of joining two [[strings]] together into a single string. For example "<code>race</code>" concatenated with "<code>car</code>" results in "<code>racecar</code>".
+
== ALGOL ==
*'''[[Splitting - string manipulation|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 "<code>A B C</code>" could be split into three separate strings, ("<code>A</code>", "<code>B</code>", "<code>C</code>"), using the space character as a delimiter.
+
{{main|String manipulation - ALGOL|l1=String manipulation}}
*'''[[Substrings - string manipulation|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 "<code>apples</code>" is "<code>pp</code>".
 
*'''[[Case conversion - string manipulation|Case conversion]]''' is the process of converting a string into a specific case for example into all lowercase or [[titlecase]].
 
*'''[[Searching - string manipulation|Searching]]''' is the process of searching for a specific pattern in a string.
 
  
== In various languages ==
+
== C# ==
Most programming languages provide a built-in mechanism or library functions for manipulating strings.
+
{{main|String manipulation - C Sharp|l1=String manipulation}}
  
{| id="mp-langs1" style="margin:4px 0 0 0; width:70%; background:none; border-spacing: 0px;"
+
== C ==
| class="MainPageBG" style="width:100%;  vertical-align:top; color:#000;" |
+
{{main|String handling - C|l1=String handling}}
{| id="mp-bottom" style="width:100%; vertical-align:top; "
 
| style="width:5%; font-size:95%; vertical-align: top;" |
 
  
* [[algol/string manipulation|ALGOL]]
+
== C++ ==
* [[c sharp/string manipulation|C Sharp]]
+
{{main|String manipulation - C++|l1=String manipulation}}
* {{C|string handling|C}}
 
* [[c++/string manipulation|C++]]
 
* [[delphi/string manipulation|Delphi]]
 
  
| style="width:5%; font-size:95%; vertical-align:top;" |
+
== Delphi ==
* [[go/string manipulation|Go]]
+
{{main|String manipulation - Delphi|l1=String manipulation}}
* [[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;" |
+
== Go ==
* {{mIRC|string manipulation|mIRC}}
+
{{main|String manipulation - Go|l1=String manipulation}}
* [[php/string manipulation|PHP]]
 
* [[python/string manipulation|Python]]
 
* [[ruby/string manipulation|Ruby]]
 
  
|}
+
== Haskell ==
|}
+
{{main|String manipulation - Haskell|l1=String manipulation}}
  
[[Category:string]]
+
== Java ==
 +
{{main|String manipulation - Java|l1=String manipulation}}
 +
 
 +
== JavaScript ==
 +
{{main|String manipulation - JavaScript|l1=String manipulation}}
 +
 
 +
== Lua ==
 +
{{main|String manipulation - Lua|l1=String manipulation}}
 +
 
 +
== mIRC ==
 +
{{main|String manipulation - mIRC|l1=String manipulation}}
 +
 
 +
== PHP ==
 +
{{main|String manipulation - PHP|l1=String manipulation}}
 +
 
 +
== Python ==
 +
{{main|String manipulation - Python|l1=String manipulation}}
 +
 
 +
== Ruby ==
 +
{{main|String manipulation - Ruby|l1=String manipulation}}

Please note that all contributions to WikiChip may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see WikiChip:Copyrights for details). Do not submit copyrighted work without permission!

Cancel | Editing help (opens in new window)