Giter Site home page Giter Site logo

fixedstring's People

Contributors

moth-tolias avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

fixedstring's Issues

Some bugs / inconsistencies

Bugs:

  1. Missings bounds checking in
  • this(in char[])
  • opIndexAssign (might extend length past maxSize
  1. opIndex discards length by returning char[maxSize] (should probably return a slice)
  2. concat doesn't check if s is big enough

Enhancements:

  1. slice assignments instead of plain loops
  2. forward fixedstring methods to the slice ones instead of copying the implementation? (depends on 2.)

(Meta issue because I'm lazy)

Feature Request: FixedString from literal with automatic length

Currently, to create a FixedString from a string literal, we have to pass the length explicitly:

enum literal = "hello";
FixedString!(literal.length) s = literal;

It would be convenient if there was a helper template that calculated the length automatically, so that we could instead write code like this:

auto s = fixedString!"hello";

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.