original_string: protected function find_button(array &$params, $button) {
          foreach ($params as $key => $value) {
              if (preg_match('/^theme_advanced_buttons(\d+)$/', $key, $matches) &&
                      strpos(','. $value. ',', ','. $button. ',') !== false) {
                  return (int)$matches[1];
              }
          }
          return false;
      }
code: protected function find_button(array &$params, $button) {
          foreach ($params as $key => $value) {
              if (preg_match('/^theme_advanced_buttons(\d+)$/', $key, $matches) &&
                      strpos(','. $value. ',', ','. $button. ',') !== false) {
                  return (int)$matches[1];
              }
          }
          return false;
      }
code_tokens: protected function find_button ( array & $ params , $ button ) { foreach ( $ params as $ key => $ value ) { if ( preg_match ( '/^theme_advanced_buttons(\d+)$/' , $ key , $ matches ) && strpos ( ',' . $ value . ',' , ',' . $ button . ',' ) !== false ) { return ( int ) $ matches [ 1 ] ; } } return false ; }
docstring: Tests if button is already present.
  
  @param array $params TinyMCE init parameters array
  @param string $button button name
  @return false|int false if button is not found, row number otherwise (row numbers start from 1)
docstring_tokens: Tests if button is already present .