
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.
Popular Backend topics









Other popular topics










Categories:
Sub Categories:
Popular Portals
- /elixir
- /rust
- /wasm
- /ruby
- /erlang
- /phoenix
- /keyboards
- /rails
- /js
- /python
- /security
- /go
- /swift
- /vim
- /clojure
- /emacs
- /haskell
- /java
- /onivim
- /svelte
- /typescript
- /crystal
- /kotlin
- /c-plus-plus
- /tailwind
- /gleam
- /ocaml
- /react
- /elm
- /flutter
- /vscode
- /ash
- /opensuse
- /centos
- /html
- /php
- /deepseek
- /zig
- /scala
- /lisp
- /sublime-text
- /textmate
- /nixos
- /debian
- /agda
- /react-native
- /kubuntu
- /arch-linux
- /revery
- /django
- /ubuntu
- /manjaro
- /spring
- /nodejs
- /diversity
- /lua
- /c
- /julia
- /slackware
- /markdown