Menu

- Learn
- Documentation
  - Language Reference
  - Library Reference
  - Command-line Reference
  - Feature Overview
  - Articles
- Downloads
- Packages
- Community
  - Blog
  - Orgs using D
  - Twitter
  - Forums
  - IRC
  - Community Discord
  - Wiki
  - GitHub
  - Issues
  - Get involved
  - Contributors
  - Foundation
  - Security Team
  - Donate
  - Sponsors
- Resources
  - Tour
  - Books
  - Tutorials
  - Tools
  - Editors
  - IDEs
  - run.dlang.io
  - Visual D
  - Acknowledgments
  - D Style
  - Glossary
  - Sitemap

Search
Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using a local clone.

# core.internal.string

String manipulation and comparison utilities.
License:
Boost License 1.0.
Authors:
Sean Kelly, Walter Bright

Source rt/util/string.d

@safe char[] `unsignedToTempString`(uint radix = 10)(ulong `value`, return scope char[] `buf`)
if (radix >= 2 && (radix <= 16));
  Converts an unsigned integer value to a string of characters.
  This implementation is a template so it can be used when compiling with -betterC.
  Parameters:

  ulong `value` | the unsigned integer value to convert
  char[] `buf` | the pre-allocated buffer used to store the result
  radix | the numeric base to use in the conversion (defaults to 10)

  Returns:
  The unsigned integer value as a string of characters
@safe auto `unsignedToTempString`(uint radix = 10)(ulong `value`);
  Converts an unsigned integer value to a string of characters.
  This implementation is a template so it can be used when compiling with -betterC.
  Parameters:

  ulong `value` | the unsigned integer value to convert
  radix | the numeric base to use in the conversion (defaults to 10)

  Returns:
  The unsigned integer value as a string of characters
@safe int `numDigits`(uint radix = 10)(ulong `value`)
if (radix >= 2 && (radix <= 36));
  Determine number of digits that will result from a conversion of value to a string.
  Parameters:

  ulong `value` | number to convert
  radix | radix

  Returns:
  number of digits

Copyright © 1999-2023 by the D Language Foundation | Page generated by Ddoc on Wed Mar 1 14:56:29 2023