@@ -262,14 +262,27 @@ impl std::fmt::Display for Formatter {
262
262
///
263
263
/// # Regular expression arguments
264
264
///
265
- /// Some [`Builder`] methods like the `allowlist_*` and `blocklist_*` family of methods allow
266
- /// regular expressions as arguments. These regular expressions will be parenthesized and wrapped
267
- /// in `^` and `$`. So if `<regex>` is passed as argument, the regular expression to be stored will
268
- /// be `^(<regex>)$`.
265
+ /// Some [`Builder`] methods such as the `allowlist_*` and `blocklist_*` methods allow regular
266
+ /// expressions as arguments. These regular expressions will be enclosed in parentheses and
267
+ /// anchored with `^` and `$`. So if the argument passed is `<regex>`, the regular expression to be
268
+ /// stored will be `^(<regex>)$`.
269
+ ///
270
+ /// As a consequence, regular expressions passed to `bindgen` will try to match the whole name of
271
+ /// an item instead of a section of it, which means that to match any items with the prefix
272
+ /// `prefix`, the `prefix.*` regular expression must be used.
273
+ ///
274
+ /// Certain methods, like [`Builder::allowlist_function`], use regular expressions over function
275
+ /// names. To match C++ methods, prefix the name of the type where they belong followed by an
276
+ /// underscore. So if the type `Foo` has a method `bar`, it can be matched with the `Foo_bar`
277
+ /// regular expression.
278
+ ///
279
+ /// Additionally, Objective-C interfaces can be matched by prefixing the regular expression with
280
+ /// `I`. For example, the `IFoo` regular expression matches the `Foo` interface and the `IFoo_foo`
281
+ /// regular expression matches the `foo` method of the `Foo` interface.
269
282
///
270
283
/// Releases of `bindgen` with a version lesser or equal to `0.62.0` used to accept the wildcard
271
284
/// pattern `*` as a valid regular expression. This behavior has been deprecated and the `.*`
272
- /// pattern must be used instead.
285
+ /// regular expression must be used instead.
273
286
#[ derive( Debug , Default , Clone ) ]
274
287
pub struct Builder {
275
288
options : BindgenOptions ,
0 commit comments