A C++ class to parse array index slice strings as in Python or MATLAB.

Add a Review
1 Download (This Week)
Last Update:
Download ezSlice-0.1.1.tar.gz
Browse All Files


This is a templated, self-contained, single header implementation C++ class for parsing array slice operator strings that specify a min, max, and stride, such as "1:10:2", "::3" or "-1,-5,-2". There is an option to use any offset based indexing desired, such as 0-based for C/Python arrays, or 1-based for Fortran/MATLAB indexing. Reverse indexing is allowed, as well as relative to an array end. This class won't do the actual slice/sampling of an array; instead it only parses a string and returns the index limits and stride, or an STL vector of indices if desired.

ezSlice Web Site


Update Notifications

Write a Review

User Reviews

Be the first to post a review of ezSlice!

Additional Project Details


Screenshots can attract more users to your project.
Features can attract more users to your project.

Icons must be PNG, GIF, or JPEG and less than 1 MiB in size. They will be displayed as 48x48 images.