Common: add GetTextVars for unexpanded variable names
This commit is contained in:
parent
500779fc80
commit
e2f47ecabb
|
@ -112,6 +112,18 @@ wxString ExpandTextVars( const wxString& aSource,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
wxString GetTextVars( const wxString& aSource )
|
||||||
|
{
|
||||||
|
std::function<bool( wxString* )> tokenExtractor =
|
||||||
|
[&]( wxString* token ) -> bool
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
|
||||||
|
return ExpandTextVars( aSource, &tokenExtractor );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Stolen from wxExpandEnvVars and then heavily optimized
|
// Stolen from wxExpandEnvVars and then heavily optimized
|
||||||
//
|
//
|
||||||
|
|
|
@ -91,6 +91,11 @@ wxString ExpandTextVars( const wxString& aSource,
|
||||||
|
|
||||||
wxString ExpandTextVars( const wxString& aSource, const PROJECT* aProject );
|
wxString ExpandTextVars( const wxString& aSource, const PROJECT* aProject );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns any variables unexpanded, e.g. ${VAR} -> VAR
|
||||||
|
*/
|
||||||
|
wxString GetTextVars( const wxString& aSource );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Replace any environment and/or text variables in file-path uris (leaving network-path URIs
|
* Replace any environment and/or text variables in file-path uris (leaving network-path URIs
|
||||||
* alone).
|
* alone).
|
||||||
|
|
Loading…
Reference in New Issue