kirkjkrauss

kirkjkrauss

Matching Wildcards in Rust

I’m not the first developer to code a method dedicated to matching the classic ‘*’ and ‘?’ wildcards in Rust.  But I may be the first to code an all-logic algorithm for that purpose – in this case, an algorithm informed by performance and testcase suggestions from many folks in the C/C++ developer community,

All that was needed, algorithmically speaking, was a logic tweak to fit Rust-style text content.  The result: a pair of functions, one for matching wildcards in ASCII text (fast!), and another, based on the same algorithm, that’s UTF-8-ready.  The code is available on GitHub.

Though the original C/C++ code works only for ASCII text strings, Rust has made a UTF-8-enabled implementation as simple as using a built-in data type.  New UTF-8 testcases are provided with the Rust code.  A description of the algorithm’s history, the process of converting it to Rust, some philosophy legitimizing the conditional logic approach, and the development of the UTF-8 testcases, all appear at developforperfromance.com.

Where Next?

Popular Backend topics Top

ErlangSolutions
MongooseIM is a massively scalable Instant Messaging server, designed to provide flexibility and reliability for almost any messaging use...
New
CommunityNews
Runtime and compiler performance is out of this world. New features include better error handling, a more powerful API, cross-compilation...
New
First poster: bot
This is a full alternative implementaion of the Rust language ontop of GCC which the goal to become fully upstream with the GNU toolchain...
New
Exadra37
A tool for exploring a docker image, layer contents, and discovering ways to shrink the size of your Docker/OCI image.
New
First poster: bot
Podman is an open-source project that is available on most Linux platforms and resides on GitHub. Podman is a daemonless container engine...
New
First poster: Carter
https://makepad.dev/ This thread was posted by one of our members via one of our news source trackers.
New
First poster: bot
Check if an email address exists without sending any email, written in Rust.
New
crirvine
To my knowledge, up until now, all Business Process Management (BPM) platforms have been Java based. If you are a Java developer and have...
New
fabforms
I would like to announce updates to fabform.io our form backend service for developers
New
kirkjkrauss
I’m not the first developer to code a method dedicated to matching the classic ‘*’ and ‘?’ wildcards in Rust.  But I may be the first to...
New

Other popular topics Top

New
AstonJ
I’ve been hearing quite a lot of comments relating to the sound of a keyboard, with one of the most desirable of these called ‘thock’, he...
New
dimitarvp
Small essay with thoughts on macOS vs. Linux: I know @Exadra37 is just waiting around the corner to scream at me “I TOLD YOU SO!!!” but I...
New
AstonJ
In case anyone else is wondering why Ruby 3 doesn’t show when you do asdf list-all ruby :man_facepalming: do this first: asdf plugin-upd...
New
Exadra37
Oh just spent so much time on this to discover now that RancherOS is in end of life but Rancher is refusing to mark the Github repo as su...
New
AstonJ
If you are experiencing Rails console using 100% CPU on your dev machine, then updating your development and test gems might fix the issu...
New
PragmaticBookshelf
Build efficient applications that exploit the unique benefits of a pure functional language, learning from an engineer who uses Haskell t...
New
New
PragmaticBookshelf
Author Spotlight Rebecca Skinner @RebeccaSkinner Welcome to our latest author spotlight, where we sit down with Rebecca Skinner, auth...
New
New