Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8773247
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T18:14:45+00:00 2026-06-13T18:14:45+00:00

Is there a way to run multiple filters in a single %rename call in

  • 0

Is there a way to run multiple filters in a single %rename call in SWIG?

I know from the manual that I can use a line like this:

%rename("%(strip:[H3D])s") "";

which will turn all methods such as “H3DFoo” in to “Foo”. There are other in-built filters for doing case transformation, but there is no documentation on how to do multiple steps.

Using another %rename replaces the filter, and I haven’t found a separator to run multiple filters on the string. So, it appears possible to convert type casing or remove a prefix and not both.

In this particular case it might be possible to use the regex filter, but it would be nice to be able to both remove a prefix and convert type casing. The other option is to put a %rename on every single declaration, but this defeats the purpose of %rename being able to apply to a module in general.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T18:14:46+00:00Added an answer on June 13, 2026 at 6:14 pm

    I think I’d be inclined to go for the variant of %rename that can call a command if your rules are more complicated than a single variant or a regex.

    I would use perl personally and it has a plethora of CPAN modules for things like renaming, e.g.:

    %rename("command:perl build/rename.pl <<<")
    

    The manual warns against this because it’s slow spawning processes to perform it. Given that typically you don’t run SWIG very often I don’t see that as a huge draw back.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Please let me know if there is a way I can run multiple python
Is there a way to run multiple threads inside a single EJB execution? What
I'm attempting to build a binary package that can be run on multiple Linux
Is there a way to test iphone OS 3.0 p2p applications? Can I run
Is there a good way to run and manage multiple nodejs apps on a
Is there a way to run same test(for example Lightweight Hotspots) multiple times in
Question: Is there a way to force the Task Parallel Library to run multiple
Hi I am wondering if there is a good way to run multiple functions
Possible Duplicate: Is there a way to run multiple iOS Simulators at once? I'm
Is there a way to run PHP 5.3 next PHP 5.4? I'd like it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.