research/seq_flow_lite/tf_ops/projection_normalizer_util.cc
// Returns true if the given text contains a number.
Returns true if the given text contains a number.
Returns true if the given text contains a number .
bool IsDigit(const std::string& text) {
  Rune rune;
  for (size_t i = 0; i < text.length();) {
    const int bytes_read = chartorune(&rune, const_cast<char *>(text.data()));
    if (rune == Runeerror || bytes_read == 0) break;
    if (rune >= static_cast<Rune>('0') && rune <= static_cast<Rune>('9')) {
      return true;
    }
    i += bytes_read;
  }
  return false;
}
bool IsDigit ( const std :: string & text ) { Rune rune ; for ( size_t i = 0 ; i < text . length ( ) ; ) { const int bytes_read = chartorune ( & rune , const_cast < char * > ( text . data ( ) ) ) ; if ( rune == Runeerror || bytes_read == 0 ) break ; if ( rune >= static_cast < Rune > ( ' ' ) && rune <= static_cast < Rune > ( ' ' ) ) { return true ; } i += bytes_read ; } return false ; }
Returns true if the given text contains a number.
Returns true if the given text contains a number .