@@ -4765,9 +4765,21 @@ the configuration (without a prefix: ``Auto``).
47654765 Decimal: 3
47664766 Hex: -1
47674767
4768- You can also specify a minimum number of digits (``BinaryMinDigits ``,
4769- ``DecimalMinDigits ``, and ``HexMinDigits ``) the integer literal must
4770- have in order for the separators to be inserted.
4768+ You can also specify a minimum number of digits
4769+ (``BinaryMinDigitsInsert ``, ``DecimalMinDigitsInsert ``, and
4770+ ``HexMinDigitsInsert ``) the integer literal must have in order for the
4771+ separators to be inserted, and a maximum number of digits
4772+ (``BinaryMaxDigitsRemove ``, ``DecimalMaxDigitsRemove ``, and
4773+ ``HexMaxDigitsRemove ``) until the separators are removed. This divides the
4774+ literals in 3 regions, always without separator (up until including
4775+ ``xxxMaxDigitsRemove ``), maybe with, or without separators (up until
4776+ excluding ``xxxMinDigitsInsert ``), and finally always with separators.
4777+
4778+ .. note ::
4779+
4780+ ``BinaryMinDigits ``, ``DecimalMinDigits ``, and ``HexMinDigits `` are
4781+ deprecated and renamed to ``BinaryMinDigitsInsert ``,
4782+ ``DecimalMinDigitsInsert ``, and ``HexMinDigitsInsert ``, respectively.
47714783
47724784 * ``int8_t Binary `` Format separators in binary literals.
47734785
@@ -4778,15 +4790,28 @@ the configuration (without a prefix: ``Auto``).
47784790 /* 3: */ b = 0b100'111'101'101;
47794791 /* 4: */ b = 0b1001'1110'1101;
47804792
4781- * ``int8_t BinaryMinDigits `` Format separators in binary literals with a minimum number of digits.
4793+ * ``int8_t BinaryMinDigitsInsert `` Format separators in binary literals with a minimum number of digits.
47824794
47834795 .. code-block :: text
47844796
47854797 // Binary: 3
4786- // BinaryMinDigits : 7
4798+ // BinaryMinDigitsInsert : 7
47874799 b1 = 0b101101;
47884800 b2 = 0b1'101'101;
47894801
4802+ * ``int8_t BinaryMaxDigitsRemove `` Remove separators in binary literals with a maximum number of digits.
4803+
4804+ .. code-block :: text
4805+
4806+ // Binary: 3
4807+ // BinaryMinDigitsInsert: 7
4808+ // BinaryMaxDigitsRemove: 4
4809+ b0 = 0b1011; // Always removed.
4810+ b1 = 0b101101; // Not added.
4811+ b2 = 0b1'01'101; // Not removed, not corrected.
4812+ b3 = 0b1'101'101; // Always added.
4813+ b4 = 0b10'1101; // Corrected to 0b101'101.
4814+
47904815 * ``int8_t Decimal `` Format separators in decimal literals.
47914816
47924817 .. code-block :: text
@@ -4795,15 +4820,28 @@ the configuration (without a prefix: ``Auto``).
47954820 /* 0: */ d = 184467'440737'0'95505'92ull;
47964821 /* 3: */ d = 18'446'744'073'709'550'592ull;
47974822
4798- * ``int8_t DecimalMinDigits `` Format separators in decimal literals with a minimum number of digits.
4823+ * ``int8_t DecimalMinDigitsInsert `` Format separators in decimal literals with a minimum number of digits.
47994824
48004825 .. code-block :: text
48014826
48024827 // Decimal: 3
4803- // DecimalMinDigits : 5
4828+ // DecimalMinDigitsInsert : 5
48044829 d1 = 2023;
48054830 d2 = 10'000;
48064831
4832+ * ``int8_t DecimalMaxDigitsRemove `` Remove separators in decimal literals with a maximum number of digits.
4833+
4834+ .. code-block :: text
4835+
4836+ // Decimal: 3
4837+ // DecimalMinDigitsInsert: 7
4838+ // DecimalMaxDigitsRemove: 4
4839+ d0 = 2023; // Always removed.
4840+ d1 = 123456; // Not added.
4841+ d2 = 1'23'456; // Not removed, not corrected.
4842+ d3 = 5'000'000; // Always added.
4843+ d4 = 1'23'45; // Corrected to 12'345.
4844+
48074845 * ``int8_t Hex `` Format separators in hexadecimal literals.
48084846
48094847 .. code-block :: text
@@ -4812,16 +4850,30 @@ the configuration (without a prefix: ``Auto``).
48124850 /* 0: */ h = 0xDEAD'BEEF'DE'AD'BEE'Fuz;
48134851 /* 2: */ h = 0xDE'AD'BE'EF'DE'AD'BE'EFuz;
48144852
4815- * ``int8_t HexMinDigits `` Format separators in hexadecimal literals with a minimum number of
4853+ * ``int8_t HexMinDigitsInsert `` Format separators in hexadecimal literals with a minimum number of
48164854 digits.
48174855
48184856 .. code-block :: text
48194857
48204858 // Hex: 2
4821- // HexMinDigits : 6
4859+ // HexMinDigitsInsert : 6
48224860 h1 = 0xABCDE;
48234861 h2 = 0xAB'CD'EF;
48244862
4863+ * ``int8_t HexMaxDigitsRemove `` Remove separators in hexadecimal literals with a maximum number of
4864+ digits.
4865+
4866+ .. code-block :: text
4867+
4868+ // Hex: 2
4869+ // HexMinDigitsInsert: 6
4870+ // HexMaxDigitsRemove: 4
4871+ h0 = 0xAFFE; // Always removed.
4872+ h1 = 0xABCDE; // Not added.
4873+ h2 = 0xABC'DE; // Not removed, not corrected.
4874+ h3 = 0xAB'CD'EF; // Always added.
4875+ h4 = 0xABCD'E; // Corrected to 0xA'BC'DE.
4876+
48254877
48264878 .. _JavaImportGroups :
48274879
0 commit comments