Visit ComfyUI Online for ready-to-use ComfyUI environment
Converts integer to string with optional leading zeros for consistent text output.
The > Int to Text node is designed to convert an integer value into its string representation, providing a straightforward way to handle numerical data as text. This can be particularly useful in scenarios where you need to display numbers as part of a text-based output or when integrating numerical values into string-based data structures. The node offers additional functionality to format the resulting text with leading zeros, ensuring a consistent length for the output string. This feature is beneficial for maintaining uniformity in text outputs, especially when dealing with fixed-width formats or aligning numerical data in a visually appealing manner.
This parameter represents the integer value that you want to convert to a text string. The integer can range from 0 to 0xffffffffffffffff, which is the maximum value for a 64-bit unsigned integer. The default value is 0. This parameter is essential as it is the primary input that will be transformed into a string.
This boolean parameter determines whether the resulting text should be padded with leading zeros to achieve a specified length. If set to True, the output string will include leading zeros; if False, the integer will be converted to a string without any additional padding. The default value is False. This parameter is useful for ensuring that all output strings have a consistent length, which can be important for formatting purposes.
This integer parameter specifies the total length of the output string when leading_zeros is set to True. The length can range from 0 to 5, with a default value of 5. This parameter is only relevant if leading_zeros is enabled, and it defines how many characters the resulting string should contain, including the leading zeros.
This output parameter is the string representation of the input integer. If leading_zeros is enabled, the string will be padded with zeros to match the specified length. Otherwise, it will be a straightforward conversion of the integer to a string. This output is crucial for any application that requires numerical data to be presented as text, ensuring compatibility with text-based systems and formats.
leading_zeros
parameter to ensure that all numerical outputs have a consistent length, which can be particularly useful for aligning numbers in tabular data or fixed-width text formats.length
parameter according to the maximum expected size of your integer values to avoid unnecessary padding or truncation.int
parameter is a valid integer within the specified range (0 to 0xffffffffffffffff).length
parameter is set to a value outside the allowed range (0 to 5).length
parameter to be within the valid range, ensuring it is between 0 and 5.leading_zeros
parameter is not a boolean value.leading_zeros
parameter is set to either True or False.© Copyright 2024 RunComfy. All Rights Reserved.