char[] | C |
char const[] | C++ |
string | C#, C++, F#, Go, Maple, OCaml, Pascal, PHP, Pike, SML, Vimscript, YCP |
string! | Rebol |
String | Ada, C#, CoffeeScript, Haskell, Java, JavaScript, merd, Ruby, Smalltalk, Visual Basic |
STRING | Eiffel |
str | Python, YAML |
Str | Perl6, Pliant |
NSString * | Objective-C |
CHAR, VARCHAR(size) | SQL92 |
Sequence | Io |
char | C, C#, C++, F#, OCaml, SML |
char! | Rebol |
Char | Haskell, merd, Perl6 |
Character | Ada, Smalltalk |
CHARACTER | Eiffel |
rune | Go |
'z' | Ada, B, C, C#, C++, Classic REXX, E, Eiffel, F#, Go, Haskell, Matlab, OCaml, Pascal, Pike |
"z" | BourneShell, Classic REXX, Maple, merd |
"z | Logo |
$z | Smalltalk |
#\z | Common Lisp, Scheme |
#"z" | Rebol, SML |
&z | Oz |
?z | Emacs Lisp, Ruby |
char z, [char] z(1) | Forth |
with no interpolation of variables
'...' | Beta, BourneShell, Classic REXX, CoffeeScript, CSS, FishShell, JavaScript, Lua, Matlab, Pascal, Perl, Perl6, PHP, Prolog, Python, Ruby, Smalltalk, SQL92, Vimscript, XPath, YAML |
"..." | Ada, Awk, C, C#, C++, Classic REXX, Common Lisp, CSS, Dylan, E, Eiffel, Emacs Lisp, F#, FL, Go, Haskell, Io, Java, JavaScript, Lua, Maple, Mathematica, Modula-3, MUMPS, OCaml, Oz, Pike, Pliant, Prolog, Python, Rebol, Scheme, SML, XPath, YAML, YCP |
"... | Logo |
'''...''' | Python |
"""...""" | Io, Python |
[[ ... ]] | Lua |
R"[ ... ]" | C++-0x |
<<'MARK' ... MARK | BourneShell, Perl, Ruby |
<<<'MARK' ... MARK(2) | PHP5 |
{...{...}...} | Tcl |
(...) | PostScript |
q(...(...)...), q[...], q{...}, q<...>, q/.../ | Perl, Perl6 |
%q(...(...)...), %q[...], %q{...}, %q<...>, %q/.../ | Ruby |
q(...(...)...) | merd |
@"...""..." | C# |
s"..." | Forth |
@"..." | Objective-C |
with interpolation of variables
...(3) | Tcl |
"... $v ..." | BourneShell, FishShell, Perl, Perl6, PHP, Tcl |
"... {v} ..." | merd |
"... #{v} ..." "... #$v ..." "... #@v ..." "... #@@v ..." | CoffeeScript, Ruby |
<<MARK ... $v ... MARK | BourneShell, Perl |
<<MARK ... #{v} ... MARK | Ruby |
<<<MARK ... $v ... MARK | PHP |
qq(...(... $v ...)...), qq[...], qq{...}, qq<...>, qq/.../ | Perl, Perl6 |
%Q(...(... #{v} ...)...), %Q[...], %Q{...}, %Q<...>, %Q/.../ | Ruby |
qq(...(... {v} ...)...) | merd |
"... #{v} ..." interpolate | Io |
"... %(v)s ..." % vars() | Python |
end-of-line (without writing the real CR or LF character)
\n | Tcl |
"\n" | C, C#, C++, CoffeeScript, FishShell, Go, Haskell, Io, Java, JavaScript, Lua, Maple, Mathematica, OCaml, Perl, Perl6, PHP, Pike, Python, Ruby, YCP, Yorick |
"*n" | B, BCPL |
"%N" | Eiffel |
"^/" | Rebol |
"~%"(4) | Common Lisp |
"[lf]" | Pliant |
vb_nl | Visual Basic |
<N>(5) | Smalltalk |
all strings allow multi-line strings | BourneShell, Common Lisp, E, Emacs Lisp, F#, FishShell, Io, Maple, Mathematica, OCaml, Pascal, Perl, Perl6, PHP, Ruby, Scheme, Smalltalk, YCP |
"...", {...} | Tcl |
@"..." | C# |
'''...''', """...""" | Python |
[[ ... ]] | Lua |
{...} | Rebol |
"...\n" "...\n" | C |
... "...\n\ \...\n" | Haskell |
"...", "..." | Classic REXX |
"...%N% %...%N" | Eiffel |
""" ... """ | CoffeeScript |
`...` | Go |
show | Haskell |
to_s, to_str, inspect, String() | Ruby |
to_string | merd, Pliant |
tostring | Lua, YCP |
toString | CoffeeScript, Java, JavaScript |
ToString | C#, F#, Mathematica |
String | CoffeeScript, JavaScript |
perl | Perl6 |
Dumper | Perl |
"" . e | Perl |
"" ~ e | Perl6 |
"" + e | CoffeeScript, E, Java, JavaScript |
string | Pliant, Vimscript |
str, `e`, repr | Python |
out | Eiffel |
cvs | PostScript |
T'Image(e)(6) | Ada |
asString | Io, Smalltalk |
printString | Smalltalk |
as(<string>, e) | Dylan |
(string) e | PHP, Pike |
convert(e,string) | Maple |
(coerce e 'string) | Common Lisp |
prin1-to-string | Emacs Lisp |
to string! / to-string / to "" | Rebol |
description | Objective-C |
pr1 | Yorick |
unneeded, all values are strings | Tcl |
string(e) | Go |
export-clixml | MSH |
serialize | Io, PHP |
Marshal.to_string | OCaml |
Marshal.dump | Ruby |
Data.Binary.encode | Haskell |
BinaryFormatter.Serialize | F# |
storeBinaryOn | Smalltalk |
Storable::store | Perl |
pickle.dump(7) | Python |
(with-standard-io-syntax (write obj stream)) | Common Lisp |
T'Output(6) | Ada |
import-clixml | MSH |
unserialize | PHP |
Marshal.from_string | OCaml |
Marshal.load | Ruby |
Data.Binary.decode | Haskell |
BinaryFormatter.Deserialize | F# |
readBinaryFrom | Smalltalk |
pickle.load | Python |
(with-standard-io-syntax (read obj stream)) | Common Lisp |
Storable::store | Perl |
doString | Io |
T'Input(6) | Ada |
sprintf | Awk, C, C++, F#, Maple, Matlab, merd, OCaml, Perl, Perl6, PHP, Pike, Ruby |
printf | Haskell |
% | Python, Ruby |
format | Java, Lua, Tcl |
format(8) | Common Lisp, Erlang, Scheme-SRFI28 |
Format | C#, F# |
putFormat | Beta |
stringWithFormat | Objective-C |
expandMacrosWith(8) | Smalltalk |
Storable::retrieve | Perl |
fmt.Sprintf | Go |
on strings
puts | C, Dylan, Tcl |
Awk, Basic, Java, Maple, merd, PHP, SML | |
write | JavaScript, Pascal, Pike, Yorick |
putStr | Haskell |
print_string | F#, OCaml |
console | Pliant |
writeln | JavaScript, Pascal |
write-string | Common Lisp |
putStrLn | Haskell |
Put_Line | Ada |
display | Cobol |
message | Emacs Lisp |
put_string | Eiffel |
show | Smalltalk |
print_endline(9) | OCaml |
println(9) | Java, merd |
put_chars | Erlang |
echo(10) | BourneShell, FishShell, PHP |
type | Forth |
putText | Beta |
say | Classic REXX |
p or i | GNU-sed |
fmt.Print | Go |
echom | Vimscript |
on simple objects
Perl, Perl6 | |
say(9) | Perl6 |
puts(9) | Tcl |
puts -nonewline | Tcl |
on any objects
Io, Logo, Lua, Ruby | |
print(9) | Dylan, Haskell, Python, Rebol |
Mathematica | |
print e, | Python |
println(9) | Io |
prin | Rebol |
Put | Ada |
p(9) | Ruby |
puts(11) | Ruby |
display | Scheme |
write | Common Lisp, Io, Prolog, Scheme |
writeln(9) | Io |
Common Lisp | |
printOn | Smalltalk |
princ prin1 | Common Lisp, Emacs Lisp |
print_any | F# |
WriteLine | C#, F# |
nothing - just remove ";" at the end of the expression, and it will print it | Matlab |
disp | Matlab |
printf-like
printf | Awk, C, C++, F#, Haskell, KornShell, Maple, Matlab, merd, OCaml, Perl, PHP, Ruby |
write | Pike |
WriteLine | C# |
putFormat | Beta |
format(8) | Common Lisp, Prolog |
fmt.Printf | Go |
eq ne | Perl, Perl6, Tcl |
strcmp | C, Matlab |
== !=(Vimscript: whether or not == and != are case-sensitive depends on user settings.) | CoffeeScript, Go, JavaScript, Pike, Vimscript |
==? !=?(12) | Vimscript |
==# !=#(13) | Vimscript |
== !== | PHP |
== ~= | Lua |
= \= | Prolog |
isEqualToString(14) | Objective-C |
== != | Awk, C#, C++, E, Io, merd, Python, Ruby, YCP |
== <> | Python |
== /= | Haskell |
== \= | Oz |
= != | BourneShell, FishShell, Maple, XPath |
= /= | Ada |
= \= | Classic REXX |
= <> | Beta, F#, OCaml, Pliant, SML, Visual Basic |
= ~= | Dylan, Smalltalk |
== \== or = <> \= | Classic REXX |
=== =!= / == !=(15) | Mathematica |
== ~= | Matlab |
equal? | Ruby, Scheme |
equals | Java |
equal, equalp | Common Lisp |
is_equal | Eiffel |
isEqual | Objective-C |
length | Awk, Beta, C++, CoffeeScript, Common Lisp, Eiffel, F#, Haskell, Java, JavaScript, Maple, Matlab, Objective-C, OCaml, Perl, PostScript, Prolog, Ruby |
LENGTH | Classic REXX |
'Length | Ada |
length? | Rebol |
size | C++, E, Io, Ruby, Smalltalk, SML, YCP |
Length | C#, F#, Modula-3, Oz, Pascal |
len | Go, Pliant, Python, Vimscript, Visual Basic |
strlen | C, PHP, Vimscript |
string length | Tcl |
string-length | Scheme, XPath |
StringLength | Mathematica |
sizeof | Pike |
count | Eiffel, Logo |
bytes chars | Perl6 |
CHARACTER_LENGTH | SQL92 |
atom_length | Prolog |
wc -c | FishShell |
# | Lua |
${#v} | BourneShell |
dup(16) | Forth |
+ | C#, C++, CoffeeScript, E, Eiffel, F#, Go, Java, JavaScript, merd, MSH, Pascal, Pike, Pliant, Python, Ruby, YCP |
. | Perl, PHP, Vimscript |
.. | Io, Lua |
, | Smalltalk |
~ | D, Perl6 |
& | Ada, Modula-3, Visual Basic |
^ | F#, OCaml, SML |
_ | MUMPS |
|| | Cecil, Classic REXX, Icon, Maple, PL/I, SQL92 |
++ | Haskell |
$a$b | BourneShell, FishShell, Tcl |
concatenate | Common Lisp, Dylan |
string-append | Scheme |
StringJoin | Mathematica |
cat | Maple |
Cat | Modula-3 |
strcat | C |
concat | XPath |
append | Beta, Prolog, Rebol |
stringByAppendingString | Objective-C |
Awk, Classic REXX | |
[string1 string2] | Matlab |
word | Logo |
* | Ada, E, Pike, Python, Ruby |
x | Perl, Perl6 |
times | merd |
repeat | Pliant |
repeated | Io |
str_repeat | PHP |
string repeat | Tcl |
strrep | Lua |
repmat | Matlab |
insert/dup | Rebol |
COPIES | Classic REXX |
cat(s$n) | Maple |
concat $ replicate | Haskell |
strings.Repeat | Go |
upcase / downcase | Emacs Lisp, Ruby |
uc / lc | Perl, Perl6 |
upper / lower(17) | Lua, Matlab, Pliant, Python |
toUpper / toLower | Haskell |
to_upper / to_lower | Eiffel |
To_Upper / To_Lower | Ada |
toUpperCase / toLowerCase | CoffeeScript, E, Java, JavaScript |
upper_case / lower_case | Pike |
uppercase / lowercase | F#, Logo, OCaml |
strupper / strlower | Lua |
strtoupper / strtolower | PHP |
ToUpper / ToLower | C#, F#, Oz |
toupper / tolower | Awk, C, C++ |
string toupper / string tolower | Tcl |
asLowercase / asUppercase | Io, Smalltalk |
upCase / lowCase | Beta |
uppercase form / lowercase form | Rebol |
char-upcase / char-downcase | Common Lisp, Scheme |
char_type(C_, to_upper(C)), char_type(C_, to_lower(C)) | Prolog |
\U / \L / \C | GNU-sed |
unicode.ToUpper / unicode.ToLower | Go |
upcase / downcase | Emacs Lisp, Ruby |
upper / lower | Matlab, SQL92 |
upper / lower / capitalize | Python |
uppercase/lowercase | F#, Logo, OCaml, Rebol |
upcase_atom/downcase_atom | Prolog |
toUpperCase / toLowerCase | CoffeeScript, E, Java, JavaScript |
ToUpperCase / ToLowerCase | Mathematica |
ToUpper / ToLower | C#, F# |
to_upper / to_lower | Ada, Eiffel |
toupper / tolower | Awk, YCP |
uc / lc | Perl, Perl6 |
UpperCase / LowerCase | Pascal |
StringTools[UpperCase] / StringTools[LowerCase] / StringTools[Capitalize] | Maple |
uppercaseString / lowercaseString / capitalizedString | Objective-C |
UCase / LCase | Visual Basic |
strtoupper / strtolower | PHP, Yorick |
strupper / strlower | Lua |
string toupper / string tolower / string totitle | Tcl |
string-upcase / string-downcase | Common Lisp, Scheme |
asLowercase / asUppercase / asUppercaseFirst | Smalltalk |
asLowercase / asUppercase / makeFirstCharacterUppercase | Io |
upcase_atom / downcase_atom | Prolog |
makeLC / makeUC | Beta |
parse upper var in_var out_var / parse lower var in_var out_var | Classic REXX |
strings.ToUpper / strings.ToLower / strings.Title | Go |
chr | F#, Haskell, OCaml, Pascal, Perl, Perl6, PHP, Python, Ruby, SML |
chr$ | Visual Basic |
char | Matlab |
format %c $c | Tcl |
toChar | E |
strchar | Lua |
from_integer | Eiffel |
fromCharCode | CoffeeScript, JavaScript |
FromCharacterCode | Mathematica |
character | Pliant |
Character value: c | Smalltalk |
asCharacter | Io |
code-char | Common Lisp |
integer->char | Scheme |
'Val | Ada |
(char) c | C, C#, C++, Java |
to char! / to-char | Rebol |
X2C, D2C | Classic REXX |
$CHAR(s) | MUMPS |
char_code | Prolog |
ascii | Logo |
StringTools[Char] | Maple |
utf8.DecodeRuneInString(s) | Go |
ord | F#, Haskell, Pascal, Perl, Perl6, PHP, Python, SML |
asc | Visual Basic |
getNumericValue | Java |
charCodeAt | CoffeeScript, JavaScript |
asciiValue | Smalltalk |
code | Eiffel, OCaml |
char-code | Common Lisp |
char->integer | Scheme |
s[0] | Ruby |
s 0 get | PostScript |
s at(0) | Io |
scan $s %c | Tcl |
strbyte | Lua |
toInteger | E |
'Pos | Ada |
number | Pliant |
(int) c | C, C#, C++, Java |
to integer! / to-integer | Rebol |
ToCharacterCode | Mathematica |
C2X, C2D | Classic REXX |
$ASCII(s) | MUMPS |
(done automatically when applying mathematical operations on char, such as +) | Matlab |
char | Logo |
char_code | Prolog |
StringTools[Ord] | Maple |
string(c) | Go |
s[n] | C, C#, C++, E, Go, Maple, PHP, Pike, Python, Ruby, Vimscript |
s(n) | Ada, Matlab |
s:n | Pliant |
s.[n] | F#, OCaml |
s !! n | Haskell |
s @ n | Eiffel |
s/:n | Rebol |
string index s n | Tcl |
sub | SML |
char, aref, schar, svref | Common Lisp |
GetChar | Modula-3 |
s at(n) | Io |
at(18) | C++, Smalltalk |
aref | Common Lisp |
char(s, i) | B |
charAt | CoffeeScript, Java, JavaScript |
characterAtIndex | Objective-C |
n -> s.inxGet | Beta |
string-ref | Scheme |
StringTake[s, {n}] | Mathematica |
$EXTRACT(s, n) | MUMPS |
item | Logo |
over n chars + c@ | Forth |
s/.{n}(.).*/\1/ | GNU-sed |
s[n..m] | CoffeeScript, Maple, Pike, Ruby |
s.[n..m] | F# |
s(n..m) | Ada |
s(n:m) | Matlab |
s(n,m+1) | E |
s[n:m+1] | Go, Python, Vimscript |
s[n,len] | Ruby |
s n len | Pliant |
strndup(s + n, len) | C |
substring | Eiffel, Java, Scheme, SML, XPath, YCP |
Substring | C# |
substr | C++, Perl, Perl6, PHP |
SUBSTR | Classic REXX |
sub | F#, Lua, OCaml |
SUB | Modula-3 |
subseq | Common Lisp |
slice | CoffeeScript, Io, JavaScript |
mid$ | JavaScript |
string range | Tcl |
StringTake[s, {n, m}] | Mathematica |
strpart(s, n, m) | Yorick |
copy/part at s n len | Rebol |
copy/part at s n at s m | Rebol |
s copyFrom: n to: m | Smalltalk |
(n,m)->s.sub | Beta |
[s substringWithRange:NSMakeRange(n, len)] | Objective-C |
SUBSTRING(s FROM n len) | SQL92 |
$EXTRACT(s, n, m) | MUMPS |
sub_string / sub_atom | Prolog |
(take len . drop n) s | Haskell |
over n chars + len | Forth |
s/.{n}(.{len}).*/\1/ | GNU-sed |
index | Ada, Perl, Perl6, Python, Ruby |
indexOf | CoffeeScript, Java, JavaScript |
IndexOf | C#, F# |
indexOfString | Smalltalk |
startOf | E |
search | Common Lisp, Pike, PostScript |
StringTools[Search] | Maple |
StringPosition | Mathematica |
strstr strchr | C |
find | C++, Logo, Lua, Python, Rebol, YCP |
findSeq | Io |
findSubstring | Haskell |
strfind | Matlab, Yorick |
strpos | PHP |
$FIND | MUMPS |
index_non_blank / find_token | Ada |
substring_index | Eiffel |
rangeOfString | Objective-C |
POS | Classic REXX |
POSITION(needle IN s) | SQL92 |
sub_string / sub_atom | Prolog |
string first | Tcl |
strings.Index | Go |
rindex | OCaml, Perl, Perl6, Python, Ruby |
rfind | C++, Python |
find/last | Rebol |
strrchr | C |
index(Going => Backward) | Ada |
lastStartOf | E |
lastIndexOf | CoffeeScript, Java, JavaScript |
last_index_of(19) | Eiffel |
LastIndexOf | C#, F# |
lastIndexOfString | Smalltalk |
string last | Tcl |
(search substring string :from-end t) | Common Lisp |
[string rangeOfString:substring options:NSBackwardsSearch] | Objective-C |
LASTPOS | Classic REXX |
t=strfind(s,p), t(end) | Matlab |
strrpos | PHP |
StringTools[SearchAll](s,p)[-1] | Maple |
strings.LastIndex | Go |