StringUtils
C++:
phynexis::utils::to_stringPython:phynexis.utils.to_stringHeader:src/utils/string_utils.hpp
Numeric-to-string conversion with consistent formatting.
Functions
to_string(value)
Convert a numeric value to a formatted string.
Overloads:
| Signature | Description |
|---|---|
to_string(value: int) -> str | Integer formatting |
to_string(value: float) -> str | Scientific notation for doubles |
Parameters:
| Parameter | Type | Description |
|---|---|---|
value | int | float | Numeric value to convert |
Returns:str — Formatted string
Example:
import phynexis
print(phynexis.utils.to_string(42))
print(phynexis.utils.to_string(3.14))
print(phynexis.utils.to_string(1e-6))
print(phynexis.utils.to_string(-2.5e3))
Output:
42
3.140000e+00
1.000000e-06
-2.500000e+03
Unexposed C++ API
The following C++ string utilities are not yet exposed to Python:
SplitString/JoinString— string split/joinTrim/ToLower/ToUpper— string transformsFormatString— formatted string (C++ fmt style)