code: public static Decimal128 parse(final String value) {
          String lowerCasedValue = value.toLowerCase();
  
          if (NaN_STRINGS.contains(lowerCasedValue)) {
              return NaN;
          }
          if (NEGATIVE_NaN_STRINGS.contains(lowerCasedValue)) {
              return NEGATIVE_NaN;
          }
          if (POSITIVE_INFINITY_STRINGS.contains(lowerCasedValue)) {
              return POSITIVE_INFINITY;
          }
          if (NEGATIVE_INFINITY_STRINGS.contains(lowerCasedValue)) {
              return NEGATIVE_INFINITY;
          }
          return new Decimal128(new BigDecimal(value), value.charAt(0) == '-');
      }
docs: Returns a Decimal128 value representing the given String.
  
  @param value the Decimal128 value represented as a String
  @return the Decimal128 value representing the given String
  @throws NumberFormatException if the value is out of the Decimal128 range
  @see
  <a href="https://github.com/mongodb/specifications/blob/master/source/bson-decimal128/decimal128.rst#from-string-representation">
  From-String Specification</a>