parameters: (prefix, itms, suffix, stripprefixes, stripsuffixes, env, c=None)
return_statement: return c(prefix, stripped, suffix, env)
docstring: This is a wrapper around _concat()/_concat_ixes() that checks for
      the existence of prefixes or suffixes on list items and strips them
      where it finds them.  This is used by tools (like the GNU linker)
      that need to turn something like 'libfoo.a' into '-lfoo'.
docstring_summary: This is a wrapper around _concat()/_concat_ixes() that checks for
      the existence of prefixes or suffixes on list items and strips them
      where it finds them.  This is used by tools (like the GNU linker)
      that need to turn something like 'libfoo.a' into '-lfoo'.
docstring_tokens: This is a wrapper around _concat () / _concat_ixes () that checks for the existence of prefixes or suffixes on list items and strips them where it finds them . This is used by tools ( like the GNU linker ) that need to turn something like libfoo . a into - lfoo .
function: def _stripixes(prefix, itms, suffix, stripprefixes, stripsuffixes, env, c=None):
      """
      This is a wrapper around _concat()/_concat_ixes() that checks for
      the existence of prefixes or suffixes on list items and strips them
      where it finds them.  This is used by tools (like the GNU linker)
      that need to turn something like 'libfoo.a' into '-lfoo'.
      """
  
      if not itms:
          return itms
  
      if not callable(c):
          env_c = env['_concat']
          if env_c != _concat and callable(env_c):
              # There's a custom _concat() method in the construction
              # environment, and we've allowed people to set that in
              # the past (see test/custom-concat.py), so preserve the
              # backwards compatibility.
              c = env_c
          else:
              c = _concat_ixes
  
      stripprefixes = list(map(env.subst, SCons.Util.flatten(stripprefixes)))
      stripsuffixes = list(map(env.subst, SCons.Util.flatten(stripsuffixes)))
  
      stripped = []
      for l in SCons.PathList.PathList(itms).subst_path(env, None, None):
          if isinstance(l, SCons.Node.FS.File):
              stripped.append(l)
              continue
  
          if not SCons.Util.is_String(l):
              l = str(l)
  
          for stripprefix in stripprefixes:
              lsp = len(stripprefix)
              if l[:lsp] == stripprefix:
                  l = l[lsp:]
                  # Do not strip more than one prefix
                  break
  
          for stripsuffix in stripsuffixes:
              lss = len(stripsuffix)
              if l[-lss:] == stripsuffix:
                  l = l[:-lss]
                  # Do not strip more than one suffix
                  break
  
          stripped.append(l)
  
      return c(prefix, stripped, suffix, env)
function_tokens: def _stripixes ( prefix , itms , suffix , stripprefixes , stripsuffixes , env , c = None ) : if not itms : return itms if not callable ( c ) : env_c = env [ '_concat' ] if env_c != _concat and callable ( env_c ) : # There's a custom _concat() method in the construction # environment, and we've allowed people to set that in # the past (see test/custom-concat.py), so preserve the # backwards compatibility. c = env_c else : c = _concat_ixes stripprefixes = list ( map ( env . subst , SCons . Util . flatten ( stripprefixes ) ) ) stripsuffixes = list ( map ( env . subst , SCons . Util . flatten ( stripsuffixes ) ) ) stripped = [ ] for l in SCons . PathList . PathList ( itms ) . subst_path ( env , None , None ) : if isinstance ( l , SCons . Node . FS . File ) : stripped . append ( l ) continue if not SCons . Util . is_String ( l ) : l = str ( l ) for stripprefix in stripprefixes : lsp = len ( stripprefix ) if l [ : lsp ] == stripprefix : l = l [ lsp : ] # Do not strip more than one prefix break for stripsuffix in stripsuffixes : lss = len ( stripsuffix ) if l [ - lss : ] == stripsuffix : l = l [ : - lss ] # Do not strip more than one suffix break stripped . append ( l ) return c ( prefix , stripped , suffix , env )