Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

11
LINES

< > BotCompany Repo | #2000385 // IOIOI - Parse Java string literals (simple cases)

New Tinybrain snippet

In: "if"
Out: "0"
In: "\"some text\";"
Out: "6"
In: "\"\" bla"
Out: "2"
In: " \"\""
Out: "0"
In: "\"more text\" + \"bla\""
Out: "11"
In: "\"test\"), somethingElse"

Author comment

Should return "6"

download  show line numbers   

Snippet is not live.

Travelled to 12 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

Comments [hide]

ID Author/Program Comment Date
69 stefan Hints:
-Out=0 is special
-Look at first character
-Out refers to string length from left
2015-06-24 20:21:40

add comment

Snippet ID: #2000385
Snippet name: IOIOI - Parse Java string literals (simple cases)
Eternal ID of this version: #2000385/1
Text MD5: cd6a4c87d47572b23074b892f8bd12e6
Author: stefan
Category:
Type: New Tinybrain snippet
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2015-06-24 20:16:31
Source code size: 173 bytes / 11 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 826 / 399
Referenced in: [show references]