You appear to be a bot. Output may be restricted
Description
Only bbboing characters inside a complex stringbboing only the character parts of a continuous string of characters in a word with some sanity checking on what we're messing with Punctuation characters used to delimit the bbboinging are: -.:;?' – well anything else really except characters we don't even accept digits
Usage
$string = bboing2( $word );
Parameters
- $word
- ( string ) required –
Returns
string $wrodSource
File name: bbboing/bbboing.incLines:
1 to 32 of 32
function bboing2( $word ) { if ( bboing_process_word( $word ) ) { $chars = str_split( $word ); $count = 0; $first = null; $subword = null; foreach ( $chars as $index => $char ) { if ( ctype_alpha( $char ) ) { $count++; if ( $first === null ) { $first = $index; } $subword .= $char; } else { if ( $count > 0 ) { boingsubword( $chars, $subword, $first ); } $count=0; $first=null; $subword = null; } } if ( $count > 0 ) { boingsubword( $chars, $subword, $first ); } $wrod = implode( $chars ); } else { $wrod = $word; } return( $wrod ); }View on GitHub View on Trac