src/third_party/icu/source/i18n/units_converter.cpp
// Returns `double` from a scientific number that could has a division sign (i.e. "1", "2.01", "3.09E+4"
// or "2E+2/3")
Returns `double` from a scientific number that could has a division sign
Returns ` double ` from a scientific number that could has a division sign
double strHasDivideSignToDouble(StringPiece strWithDivide, UErrorCode &status) {
    int divisionSignInd = -1;
    for (int i = 0, n = strWithDivide.length(); i < n; ++i) {
        if (strWithDivide.data()[i] == '/') {
            divisionSignInd = i;
            break;
        }
    }
    if (divisionSignInd >= 0) {
        return strToDouble(strWithDivide.substr(0, divisionSignInd), status) /
               strToDouble(strWithDivide.substr(divisionSignInd + 1), status);
    }
    return strToDouble(strWithDivide, status);
}
double strHasDivideSignToDouble ( StringPiece strWithDivide , UErrorCode & status ) { int divisionSignInd = -1 ; for ( int i = 0 , n = strWithDivide . length ( ) ; i < n ; ++ i ) { if ( strWithDivide . data ( ) [ i ] == ' ' ) { divisionSignInd = i ; break ; } } if ( divisionSignInd >= 0 ) { return strToDouble ( strWithDivide . substr ( 0 , divisionSignInd ) , status ) / strToDouble ( strWithDivide . substr ( divisionSignInd + 1 ) , status ) ; } return strToDouble ( strWithDivide , status ) ; }
Returns `double` from a scientific number that could has a division sign (i.e.
Returns ` double ` from a scientific number that could has a division sign ( i . e .