Skip to content

Commit

Permalink
strings
Browse files Browse the repository at this point in the history
  • Loading branch information
Artem Tyurin committed Mar 7, 2012
1 parent 1c6860e commit 7b24fa3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
</head>

<body>
<a href="http://github.com/agentcooper"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://a248.e.akamai.net/assets.github.com/img/7afbc8b248c68eb468279e8c17986ad46549fb71/687474703a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub"></a>

<div class="containter">
<table>
Expand Down Expand Up @@ -192,19 +193,21 @@

<td><pre><code class="ruby">
'hello'.index('e') # 1
'hello'.include? 'lo' # true
'hello'.rindex('l') # 3

if 'hello'.include? 'lo' then puts 'found' end

'hello' * 3 # 'hellohellohello'

'a/b/c'.split('/') # ['a', 'b', 'c']
</code></pre></td>

<td><pre><code class="javascript">
'hello'.indexOf('e') // 1
~'hello'.indexOf('lo') // true
'hello'.lastIndexOf('l') // 3

if (~'hello'.indexOf('lo')) { console.log('found'); }

(new Array(3 + 1)).join('hello') // 'hellohellohello'

'a/b/c'.split('/') // ['a', 'b', 'c']
Expand Down

0 comments on commit 7b24fa3

Please sign in to comment.