has-word

A quick non-regex word-boundary checker

NAME

has-word - A quick non-regex word-boundary checker

SYNOPSIS

use has-word;

say has-word("foobarbaz", "foo");      # False
say has-word("foo barbaz", "foo");     # True
say has-word("foo::bar::baz", "bar");  # True
say has-word("foo::bar::baz", "baz");  # True

DESCRIPTION

The has-word module exports a single subroutine has-word that provides a quick way to see whether a string occurs as a "word" (defined as a number of alphanumeric characters surrounded by either non-alphanumeric characters or the beginning or end of the string. As such, it provides the equivalent of the word functionality in regular expressions, but much faster and with a simpler way of checking for words that cannot be determined at compile time.

AUTHOR

Elizabeth Mattijsen [email protected]

COPYRIGHT AND LICENSE

Copyright 2021 Elizabeth Mattijsen

Source can be located at: https://github.com/lizmat/has-word . Comments and Pull Requests are welcome.

This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.

has-word v0.0.1

A quick non-regex word-boundary checker

Authors

  • Elizabeth Mattijsen

License

Artistic-2.0

Dependencies

Test Dependencies

Provides

  • has-word

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.