Convert an integer number into human readable hexadecimal format.

@param number a number to be converted
@return a string with human readable hexadecimal number representation
502337
public static String int2msg(final int number) {
    return number + " (0x" + Long.toHexString((long) number & 0xFFFFFFFFL).toUpperCase(Locale.ENGLISH) + ')';
  }
333522
private function toBinary(string $number) : string
    {
        $result = '';

        while ($number !== '0') {
            [$number, $remainder] = $this->divQR($number, '256');
            $result .= \chr((int) $remainder);
        }

        return \strrev($result);
    }
872680
public static Number transformNumber( Number input ) {
      if( input instanceof Float ){
         return new Double( input.toString() );
      }else if( input instanceof Short ){
         return new Integer( input.intValue() );
      }else if( input instanceof Byte ){
         return new Integer( input.intValue() );
      }else if( input instanceof Long ){
         Long max = new Long( Integer.MAX_VALUE );
         if( input.longValue() <= max.longValue() && input.longValue() >= Integer.MIN_VALUE ){
            return new Integer( input.intValue() );
         }
      }

      return input;
   }
1187291
public String normalizeNumber(final String number) {
        try {
            final BigDecimal normalizedNumber = parseNumber(new NumberBuffer(
                    number));
            if (normalizedNumber == null) {
                return number;
            }
            return normalizedNumber.toBigIntegerExact().toString();

        } catch (NumberFormatException | ArithmeticException e) {
            // Return the source number in case of error, i.e. malformed input
            return number;
        }
    }
974374
function toHexString(number, numberOfBytes) {
  numberOfBytes = numberOfBytes || 1;
  let hexString = '00'.repeat(numberOfBytes) + number.toString(16);

  return hexString.substr(-2 * numberOfBytes);
}
345377
public static PactDslRootValue integerType(Long number) {
    PactDslRootValue value = new PactDslRootValue();
    value.setValue(number);
    value.setMatcher(new NumberTypeMatcher(NumberTypeMatcher.NumberType.INTEGER));
    return value;
  }
516996
public static String humanReadableInt(long number) {
    DecimalFormat oneDecimal = new DecimalFormat("0.0");
    long absNumber = Math.abs(number);
    double result;
    String prefix = number < 0 ? "-" : "";
    String suffix;
    if (absNumber < 1000) {
      // since no division has occurred, don't format with a decimal point
      return number + " bytes";
    } else if (absNumber < 1000.0 * 1000.0) {
      result = number / 1000.0;
      suffix = " KB";
    } else if (absNumber < 1000.0 * 1000.0 * 1000.0) {
      result = number / (1000.0 * 1000.0);
      suffix = " MB";
    } else {
      result = number / (1000.0 * 1000.0 * 1000.0);
      suffix = " GB";
    }
    return prefix + oneDecimal.format(result) + suffix;
  }
1154062
private Double getDouble(String number) {
    try {
      return Double.parseDouble(number);
    } catch (NumberFormatException e) {
      return null;
    }
  }
503246
public static String formatNumber(int num) {
        DecimalFormat format = new DecimalFormat();
        format.setDecimalSeparatorAlwaysShown(false);
        return format.format(num);
    }
300622
public static String bitString(long number) {
        return String.format(Locale.ROOT,"%064d", new BigInteger(Long.toBinaryString(number)));
    }
151280
private static String convertLessThanOneThousand(int number) {
		String soFar;

		if (number % 100 < 20) {
			soFar = numNames[number % 100];
			number /= 100;
		} else {
			soFar = numNames[number % 10];
			number /= 10;

			soFar = tensNames[number % 10] + soFar;
			number /= 10;
		}
		if (number == 0) {
			return soFar;
		}
		return numNames[number] + " Hundred" + soFar;
	}
1077726
public static function intToRoman(int $number): string
    {
        if ($number > 4999) {
            return (string) $number;
        }

        $romanNumber = '';
        foreach (static::$romanNumerals as $intNumeral => $romanNumeral) {
            $d = floor($number / $intNumeral);
            $romanNumber .= str_repeat($romanNumeral, $d);
            $number -= $d * $intNumeral;
        }

        return $romanNumber;
    }
87377
public static String toCurrency(Locale locale, double number) {
        return NumberFormat.getCurrencyInstance(locale).format(number);
    }
254409
private static final String toBrowserHexValue(final int number)
    {
        final String chex = Integer.toHexString(fixRGB(number) & 0xFF).toUpperCase();

        if (chex.length() < 2)
        {
            return "0" + chex;
        }
        return chex;
    }
1230200
private String provideRepresentation(int number)
   {
      String key;

      if (number == 0)
         key = "zero";
      else if (number < 20)
         key = numNames[number];
      else if (number < 100)
      {
         int unit = number % 10;
         key = tensNames[number / 10] + numNames[unit];
      }
      else
      {
         int unit = number % 10;
         int ten = number % 100 - unit;
         int hundred = (number - ten) / 100;
         if (hundred < 20)
            key = numNames[hundred] + " hundred";
         else
            key = tensNames[hundred / 10] + numNames[hundred % 10] + " hundred";
         if (ten + unit < 20 && ten + unit > 10)
            key += numNames[ten + unit];
         else
            key += tensNames[ten / 10] + numNames[unit];
      }
      return key.trim();
   }
1280428
public static String _char(EvaluationContext ctx, Object number) {
        return "" + (char) Conversions.toInteger(number, ctx);
    }
1053515
@Pure
	@Inline(value = "$3.formatHex($1, $2)", imported = {StringEscaper.class})
	public static String formatHex(int amount, int digits) {
		return StringEscaper.formatHex(amount, digits);
	}