Content deleted Content added
Do not use "or" inside code blocks to list multiple options: "or" is not part of the code so it is confusing. Also split options separeted by "or" with newlines instead of "or" |
m →left: {{codett}} |
||
(8 intermediate revisions by 6 users not shown) | |||
Line 342:
|[[Go (programming language)|Go]]
|-
| <code>string compare
|[[Tcl]]
|-
Line 395:
! Format !! Languages
|-
| <code>''string<sub>1</sub>'' OP ''string<sub>2</sub>''</code>, where <code>OP</code> can be any of
|[[Pascal (programming language)|Pascal]], [[Object Pascal]] ([[Delphi (software)|Delphi]]), [[OCaml]], [[Seed7]], [[Standard ML]], [[BASIC]], [[Visual Basic (classic)|VB]], [[Visual Basic .NET|VB .NET]], [[F Sharp (programming language)|F#]]
|-
| <code>''string<sub>1</sub>'' OP ''string<sub>2</sub>''</code>, where <code>OP</code> can be any of
|[[ALGOL 68]]
|-
| <code>(stringOP? ''string<sub>1</sub>'' ''string<sub>2</sub>'')</code>, where <code>OP</code> can be any of
|[[Scheme (programming language)|Scheme]]
|-
| <code>(stringOP ''string<sub>1</sub>'' ''string<sub>2</sub>'')</code>, where <code>OP</code> can be any of
|[[Scheme (programming language)|Scheme]] (SRFI 13)
|-
| <code>(stringOP ''string<sub>1</sub>'' ''string<sub>2</sub>'')</code>, where <code>OP</code> can be any of
|[[Common Lisp]]
|-
| <code>(stringOP ''string<sub>1</sub>'' ''string<sub>2</sub>'')</code>, where <code>OP</code> can be any of
|[[ISLISP]]
|-
| <code>''string<sub>1</sub>'' OP ''string<sub>2</sub>''</code>, where <code>OP</code> can be any of
|[[Rexx]]
|-
| <code>''string<sub>1</sub>'' OP ''string<sub>2</sub>''</code>, where <code>OP</code> can be any of
|[[PL/I]]
|-
| <code>''string<sub>1</sub>'' OP ''string<sub>2</sub>''</code>, where <code>OP</code> can be any of
|[[Ada (programming language)|Ada]]
|-
| <code>''string<sub>1</sub>'' OP ''string<sub>2</sub>''</code>, where <code>OP</code> can be any of
|[[Erlang (programming language)|Erlang]]
|-
| <code>''string<sub>1</sub>'' OP ''string<sub>2</sub>''</code>, where <code>OP</code> can be any of
|[[Haskell]]
|-
| <code>''string<sub>1</sub>'' OP ''string<sub>2</sub>''</code>, where <code>OP</code> can be any of
|[[Perl]], [[Raku (programming language)|Raku]]
|-
| <code>''string<sub>1</sub>'' OP ''string<sub>2</sub>''</code>, where <code>OP</code> can be any of
|[[C++]] (STL), [[C Sharp (programming language)|C#]], [[D (programming language)|D]], [[Go (programming language)|Go]], [[JavaScript]], [[Python (programming language)|Python]], [[PHP]], [[Ruby (programming language)|Ruby]], [[Rust (programming language)|Rust]],<ref name="Rust compare">In Rust, the operators
|-
| <code>''string<sub>1</sub>'' OP ''string<sub>2</sub>''</code>, where <code>OP</code> can be any of
|[[Windows PowerShell]]
|-
| <code>''string<sub>1</sub>'' OP ''string<sub>2</sub>''</code>, where <code>OP</code> can be any of
|[[Lua (programming language)|Lua]]
|-
| <code>''string<sub>1</sub>'' OP ''string<sub>2</sub>''</code>, where <code>OP</code> can be any of
|[[Smalltalk]]
|-
| <code>''string<sub>1</sub>'' OP ''string<sub>2</sub>''</code>, where <code>OP</code> can be any of
|[[Fortran]].<ref>The operators use the compiler's default collating sequence.</ref>
|-
| <code>''string<sub>1</sub>'' OP ''string<sub>2</sub>''</code> where <code>OP</code> can be any of
| [[COBOL]]
|-
| <code>''string<sub>1</sub>'' OP ''string<sub>2</sub>''</code> where <code>OP</code> can be any of
| [[Cobra (programming language)|Cobra]]
|-
Line 754:
|-
| <code>''string<sub>1</sub>'' eq ''string<sub>2</sub>''</code>
|[[Perl]], [[Raku (programming language)|Raku]], [[Tcl]]
|-
| <code>''string<sub>1</sub>''.equals(''string<sub>2</sub>'')</code>
Line 762:
|[[C Sharp (programming language)|C#]]
|-
| <code>''string<sub>1</sub>'' -eq ''string<sub>2</sub>''</code><br><code>[string]::Equals(''string<sub>1</sub>'', ''string<sub>2</sub>'')</code>
|[[Windows PowerShell]]
|-
Line 1,584:
! Format !! Languages
|-
|<code>{{codett|string (string'First .. string'First +|ada}} ''n'' - 1)</code>
|[[Ada (programming language)|Ada]]
|-
Line 1,605:
|[[Objective-C]] (<code>NSString *</code> only)
|-
| <code>{{codett|(apply str (take|clojure}} ''n'' ''string''))</code>
|[[Clojure]]
|-
Line 3,013:
|[[C (programming language)|C]] (operates on one character)
|-
|<code>{{codett|2=c|1=for(size_t i = 0, len = strlen(}}''string''); i< len; i++) ''string''[i] = toupper(''string''[i]);</code><br><code>{{codett|2=c|1=for (char *c =}} ''string''{{codett|2=c|1=; *c != '\0'; c++) *c = toupper(*c);}}</code>
|[[C (programming language)|C]] (string / char array)
|-
Line 3,069:
| <code>''string''.toUpperCase()</code>
|[[Java (programming language)|Java]], [[JavaScript]]
|-
| <code>''string''.uppercase()</code>
|[[Kotlin (programming language)|Kotlin]]<ref>{{cite web |title=uppercase - Kotlin Programming Language |url=https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/uppercase.html |website=Kotlin |access-date=9 November 2024 |language=en}}</ref>
|-
| <code>to_upper(''string'')</code>
Line 3,165 ⟶ 3,168:
|[[Factor (programming language)|Factor]]
|-
| <code>{{codett|(string-trim '(#\Space #\Tab #\Newline)|lisp}} ''string'')</code>
|[[Common Lisp]]
|-
Line 3,201 ⟶ 3,204:
|[[PHP]], [[Raku (programming language)|Raku]]
|-
| <code>[''string'' {{codett|stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]|objc}}</code>
|[[Objective-C]] using [[Cocoa (API)|Cocoa]]
|-
| <code>''string'' withBlanksTrimmed</code><br><code>''string'' withoutSpaces</code><br><code>''string'' withoutSeparators</code>
|[[Smalltalk]] ([[Squeak]], [[Pharo]])<br>[[Smalltalk]]
|-
|<code>strip(string)</code>
|[[SAS
|-
|<code>string trim ''$string''</code>
|