comefrom: <qiyuangong>434_Number_of_Segments_in_a_String_2.java
code: public int countSegments(String s) {
          int segmentCount = 0;
  
          for (int i = 0; i < s.length(); i++) {
              if ((i == 0 || s.charAt(i-1) == ' ') && s.charAt(i) != ' ') {
                  segmentCount++;
              }
          }
  
          return segmentCount;
      }
masked: public int sample_funcname ( String var_0 ) {
    int var_1 = 0 ;
    for ( int var_2 = 0 ;
    var_2 < var_0 . length ( ) ;
    var_2 ++ ) {
      if ( ( var_2 == 0 || var_0 . charAt ( var_2 - 1 ) == ' ' ) && var_0 . charAt ( var_2 ) != ' ' ) {
        var_1 ++ ;
      }
    }
    return var_1 ;
  }
  