Comparison of programming languages (string functions): Difference between revisions

Content deleted Content added
The format method also works in python 2
Add method
Line 854:
InStr("Hello mate", "e") ' returns 2
InStr(5, "Hello mate", "e") ' returns 10
InStr("wordwordf", "z") ' returns 0
</source>
 
Line 2,073:
|-
| <code>''string''.rfind(''substring''«,''startpos''«, ''endpos''»»)</code>
|rowspan=2|[[Python (programming language)|Python]]
|returns -1
|-
| <code>rpos(''string'', .rfind(''substring''«,''startpos''«, ''endpos''»»)</code>
|raises ValueError
|-
|<code>rpos(''string'', ''substring''«,''startpos''»)</code>
|[[Seed7]]
|returns 0
|-
| <code>''string''.rindex(''substring''«,''startpos''»)</code>
|[[Ruby (programming language)|Ruby]]
|returns nil