Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
L ldpl
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 8
    • Issues 8
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Lartu
  • ldpl
  • Merge requests
  • !37

Merged
Created Apr 05, 2019 by Lartu@lartu🐕Maintainer

Kill trailing 0s when converting from number->text

  • Overview 1
  • Commits 1
  • Changes 3

Created by: dvkt

Possible solution for #33 (closed)

Using this code:

DATA:
t is text

PROCEDURE:
store 3.14 in t
display t crlf
store 100 in t
display t crlf
store 88.0123456789 in t
display t crlf

Output before this patch:

3.140000
100
88.012346

After this patch:

3.14
100
88.0123456789

I looked into overriding the default std::to_string(double) but it apparently can't be done, and also the precision can't be changed from 6, but maybe there's another cleaner way?

Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: github/fork/dvkt/kill-trailing-zeros