BBCode::Internal_CleanupWSByIteratingPointer( $pattern, $pos, $array )
Description
Source
File: bp-forums/admin/parser.php
1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 | function Internal_CleanupWSByIteratingPointer( $pattern , $pos , $array ) { if ( strlen ( $pattern ) <= 0) return $pos ; foreach ( str_split ( $pattern ) as $char ) { switch ( $char ) { case 's' : while ( $pos < count ( $array ) && $array [ $pos ][BBCODE_STACK_TOKEN] == BBCODE_WS) $pos ++; break ; case 'n' : if ( $pos < count ( $array ) && $array [ $pos ][BBCODE_STACK_TOKEN] == BBCODE_NL) $pos ++; break ; case 'a' : while ( $pos < count ( $array ) && (( $token = $array [ $pos ][BBCODE_STACK_TOKEN]) == BBCODE_WS || $token == BBCODE_NL)) $pos ++; break ; } } return $pos ; } |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.