|
11:42:05 PM
Wednesday
Sep 08
| Su | M | Tu | W | Th | F | Sa |
|---|
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | 30 | 1 | 2 |
| 3 | 4 | 5 | 6 | 7 | 8 | 9 |
Play My Typing Game View Some of My Artwork | String Chopping Functions These are some string functions I wrote one night.
<? ## find everything before function FindAllBefore($str, $delimit) { if(strpos($str, $delimit) === false) { return false; } else { $pos1 = 0; $pos2 = strpos($str, $delimit); return substr($str, $pos1, $pos2); } } ## find everything before, including function FindAllBeforeIncluding($str, $delimit) { if(strpos($str, $delimit) === false) { return false; } else { $pos1 = 0; $pos2 = strpos($str, $delimit)+strlen($delimit); return substr($str, $pos1, $pos2); } } ## find everything after function FindAllAfter($str, $delimit) { if(strpos($str, $delimit) === false) { return false; } else { $pos1 = strpos($str, $delimit)+strlen($delimit); $pos2 = strlen($str); return substr($str, $pos1, $pos2); } } ## find everything after, including function FindAllAfterIncluding($str, $delimit) { if(strpos($str, $delimit) === false) { return false; } else { $pos1 = strpos($str, $delimit); $pos2 = strlen($str); return substr($str, $pos1, $pos2); } }
## find inside, including function FindInsideIncluding($str, $start, $end) { if(strpos($str, $start) === false) { return false; } else if (strpos($str, $end) === false) { return false; } else { $pos1 = strpos($str, $start); $pos2 = strpos(FindAllAfter($str, $start), $end)+strlen($end)+strlen($start); return substr($str, $pos1, $pos2); } }
## find inside function FindInside($str, $start, $end) { if(strpos($str, $start) === false) { return false; } else if (strpos($str, $end) === false) { return false; } else { $pos1 = strpos($str, $start)+strlen($start); $pos2 = strpos(FindAllAfter($str, $start), $end); return substr($str, $pos1, $pos2); } } ?>
Table of ContentsMy Background in Computing HTML & XHTML CSS PHP MySQL JavaScript Complete Applications bash Apache / .htaccess Regex Adobe Flex Coldfusion
Give a listen to my music...
How my services and skills can help you:
- Global (via Email/Skype/AIM(ichat)/Yahoo)
- Web Development Consulting
- Custom Web App Development (PHP/MySQL/jQuery/CSS) Cross-Browser & OS
- Cellphone App Development (Android/MobileWeb)
- Music Lessons & Education for Beginner Guitar, Piano, Bass, which transfers over to many other instruments I am comfortable playing but not yet at teaching.
- Music - Soundtrack Composition & Voice Work
- Local
- Most all the above, but also:
- Music Performance (Harp, Voice, Guitar, Piano, Bass, Latin Percussion)
- Recording Live Music Audio
- Video Streaming live music and other live events anywhere that can provide wifi
- Training Video Streaming to your venue's trusted soundperson
|
Skills:
- Global (via Email/Skype/AIM(ichat)/Yahoo)
- Web Development Consulting
- Custom Web App Development (PHP/MySQL/jQuery/CSS) Cross-Browser & OS
- Cellphone App Development (Android/MobileWeb)
- Music Lessons & Education for Beginner Guitar, Piano, Bass, which transfers over to many other instruments I am comfortable playing but not yet at teaching.
- Music - Soundtrack Composition & Voice Work
- Local, Most all the above, but also:
- Music Performance (Harp, Voice, Guitar, Piano, Bass, Latin Percussion)
- Being your venue's soundman
- Video Streaming live music and other live events anywhere that can provide wifi
- Training Video Streaming to your venue's trusted soundperson
|