numparse 0.1.0

Parsing numbers library


To use this package, run the following command in your project's root directory:

NUMPARSE

Library for parsing numbers from string. nothrow, @nogc, pure, @trusted and betterC compatible.

Provide:

enum ParseError
{
    none,
    wrongSymbol,
    valueLimit,
    elementCount
}

pure @nogc nothrow @trusted
ParseError parseUintNumber(int bais, T)(ref T dst, scope const(char)[] str, uint* pow=null)
    if (isIntegral!T && isUnsigned!T);

pure @nogc nothrow @trusted
ParseError parseIntNumber(int bais, T)(ref T dst, scope const(char)[] str, uint* pow=null)
    if (isIntegral!T && isSigned!T);

pure @nogc nothrow @trusted
ParseError parseSimpleFloatNumber(int bais, T)(ref T dst, scope const(char)[] str, char sep='.')
    if (isFloatingPoint!T);

bais must be >=2 and <=16

Authors:
  • deviator
Dependencies:
none
Versions:
0.1.0 2020-Sep-10
~master 2020-Sep-13
Show all 2 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 0 downloads total

Score:
0.6
Short URL:
numparse.dub.pm