code: private static float[] getFloats(String s) {
      if (s.charAt(0) == 'z' | s.charAt(0) == 'Z') {
        return new float[0];
      }
      try {
        float[] results = new float[s.length()];
        int count = 0;
        int startPosition = 1;
        int endPosition = 0;
  
        ExtractFloatResult result = new ExtractFloatResult();
        int totalLength = s.length();
  
        // The startPosition should always be the first character of the
        // current number, and endPosition is the character after the current
        // number.
        while (startPosition < totalLength) {
          extract(s, startPosition, result);
          endPosition = result.mEndPosition;
  
          if (startPosition < endPosition) {
            results[count++] = Float.parseFloat(
                s.substring(startPosition, endPosition));
          }
  
          if (result.mEndWithNegSign) {
            // Keep the '-' sign with next number.
            startPosition = endPosition;
          } else {
            startPosition = endPosition + 1;
          }
        }
        return Utils.copyOf(results, count);
      } catch (NumberFormatException e) {
        Log.e(LOGTAG, "error in parsing \"" + s + "\"");
        throw e;
      }
    }
docs: Parse the floats in the string.
  This is an optimized version of parseFloat(s.split(",|\\s"));
  
  @param s the string containing a command and list of floats
  @return array of floats