Download String Book in PDF, Epub and Kindle
Please note that the content of this book primarily consists of articles available from Wikipedia or other free sources online. Pages: 43. Chapters: Comparison of programming languages (strings), Comparison of programming languages (string functions), Concatenation, Connection string, C string handling, Docblock, Docstring, Empty string, Here document, Incompressible string, Maximal pair, Partial word, Sstream, Stringology, Strings (Unix), String (C++), String interning, String interpolation, String literal, String operations, Substring, Trimming (computer programming). Excerpt: String functions are used in computer programming languages to manipulate a string or query information about a string (some do both). Most programming languages that have a string datatype will have some string functions although there may be other low-level ways within each language to handle strings directly. In object-oriented languages, string functions are often implemented as properties and methods of string objects. In functional and list-based languages a string is represented as a list (of character codes), therefore all list-manipulation procedures could be considered string functions. However such languages may implement a subset of explicit string-specific functions as well. The most basic example of a string function is the length(string) function. This function returns the length of a string literal. e.g. length("hello world") would return 11.Other languages may have string functions with similar or exactly the same syntax or parameters or outcomes. For example in many languages the length function is usually represented as len(string). The below list of common functions aims to help limit this confusion. String functions common to many languages are listed below, including the different names used. The below list of common functions aims to help programmers find the equivalent function in a language. Note, string concatenation and regular expressions are handled in...