Skip to content

Enhance toStyledString to Support Custom Formatting, Decimal Precision, and Indentation Control #1616

@YackerYan

Description

@YackerYan

Problem Description
The current toStyledString method uses a default StreamWriterBuilder, which has the following limitations:
Users cannot customize the output format, lacking flexibility
For decimal-type data, there is no convenient way to control the number of displayed digits
No functionality to adjust the indentation of output content
These restrictions significantly reduce the practicality of toStyledString in scenarios requiring precise control over string output styles (such as data display, logging, etc.). Users have to write additional formatting logic, increasing development costs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions