| Author: | j |
|---|---|
| Mode: | text |
| Date: | Tue, 31 Aug 2010 20:27:57 |
switch(str) {
case "foo":
case "bar":
case "baz":
}
---
becomes
---
switch(str[0]) {
case 'f':
switch(str[1]) {
case 'o':
switch(str[2]) {
case 'o':
}
}
case 'b':
switch(str[1]) {
case 'a':
switch(str[2]) {
case 'r':
case 'z':
}
}
}