diff --git a/Doc/Manual/SWIG.html b/Doc/Manual/SWIG.html index 1d8f28f1c..4ea55621e 100644 --- a/Doc/Manual/SWIG.html +++ b/Doc/Manual/SWIG.html @@ -1765,7 +1765,7 @@ While writing %rename for specific declarations is simple enough, sometimes the same renaming rule needs to be applied to many, maybe all, identifiers in the SWIG input. For example, it may be necessary to apply some transformation to all the names in the target language to better follow its -naming conventions, e.g. add a specific prefix to all the functions. Doing it +naming conventions, like adding a specific prefix to all wrapped functions. Doing it individually for each function is impractical so SWIG supports applying a renaming rule to all declarations if the name of the identifier to be renamed is not specified:

@@ -1799,28 +1799,28 @@ strips the provided prefix from its argument. The prefix is specified as part of the format string, following a colon after the function name:
-%rename("%(strip:[wx])s") ""; // wxHello -> Hello; FooBar -> fooBar
+%rename("%(strip:[wx])s") ""; // wxHello -> Hello; FooBar -> FooBar
 

-Here is the table summarizing all currently defined functions with an example -of applying each one (notice that some of them have two names, a shorter one -and a more descriptive one, but the two functions are otherwise equivalent): +Below is the table summarizing all currently defined functions with an example +of applying each one. Note that some of them have two names, a shorter one +and a more descriptive one, but the two functions are otherwise equivalent:

- - + + - - + + @@ -1839,23 +1839,23 @@ and a more descriptive one, but the two functions are otherwise equivalent): - + - + - - + + Logically, this is the reverse of camelcase. @@ -1933,7 +1933,7 @@ practice, the latter is however rarely appropriate as there are always some exceptions to the general rules. To deal with them, the scope of an unnamed %rename can be limited using subsequent match parameters. They can be applied to any of the attributes associated by SWIG with the -declarations appearing in its input. One of them is the declaration name and +declarations appearing in its input. For example:

@@ -1965,7 +1965,7 @@ will capitalize the names of all the enum elements but not change the case of
 the other declarations. Similarly, %$isclass, %$isfunction
 and %$isvariable can be used. Many other checks are possible and this
 documentation is not exhaustive, see "%rename predicates" section of
-Lib/swig.swg for the full list of supported match expressions.
+swig.swg for the full list of supported match expressions.
 

@@ -1985,10 +1985,10 @@ to rename all enums nested in the given class to lower case.

-And in addition to literally matching some string with match you can -also use regexmatch or notregexmatchto match a string +In addition to literally matching some string with match you can +also use regexmatch or notregexmatch to match a string against a regular expression. For example, to ignore all functions having -"Old" suffix you could use +"Old" as a suffix you could use

@@ -1997,7 +1997,7 @@ against a regular expression. For example, to ignore all functions having
 

For simple cases like this, specifying the regular expression for the -declaration name directly can be preferable and can be done using +declaration name directly can be preferable and can also be done using regextarget:

@@ -2008,8 +2008,8 @@ declaration name directly can be preferable and can be done using

As for notregexmatch, it restricts the match only to the strings not -matching the specified regular expression. So to rename to lower case versions -all declarations except those consisting from capital letters only: +matching the specified regular expression. So to rename all declarations to lower case +except those consisting of capital letters only:

@@ -2187,7 +2187,7 @@ normally, just use the original function name such as add().
 

SWIG provides a number of extensions to standard C printf formatting that may be useful in this context. For instance, the following -variation installs the callbacks as all upper-case constants such as +variation installs the callbacks as all upper case constants such as ADD, SUB, and MUL:

@@ -2201,7 +2201,7 @@ int mul(int,int);

-A format string of "%(lower)s" converts all characters to lower-case. +A format string of "%(lower)s" converts all characters to lower case. A string of "%(title)s" capitalizes the first character and converts the rest to lower case.

FunctionReturnsExample (in/out)
upper or uppercaseUpper-case version of the string.uppercase or upperUpper case version of the string. PrintPRINT
lower or lowercaseLower-case version of the string.lowercase or lowerLower case version of the string. Printprint
PrintItprintIt
ctitle or camelcasecamelcase or ctitle String with capitalized first letter and any letter following an underscore (which are removed in the process) and rest in lower case. print_itPrintIt
lctitle or lowercamelcaselowercamelcase or lctitle String with every letter following an underscore (which is removed in the process) capitalized and rest, including the first letter, in lower case. print_itprintIt
utitle or undercaseLower case string with underscores inserted before every upper-case + undercase or utitleLower case string with underscores inserted before every upper case letter in the original string and any number not at the end of string. - Logically, this is the reverse of ccase. PrintItprint_it