Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
StringVars - Pure Java zero dependency solution to create recursive String variables
#1
About: StringVars is a zero dependency pure Java solution to create recursive String variables, such as $var$ or %var%.
License: Public Domain
Source: https://konloch.com/StringVars/
Download Jar: https://konloch.com/StringVars/releases/
Add as maven dependency:
Code:
<dependency>
  <groupId>com.konloch</groupId>
  <artifactId>StringVars</artifactId>
  <version>1.0.0</version>
</dependency>

Implementation Example
Click here for the StringHolderExample class
Code:
StringHolderExample example = new StringHolderExample()
{
    @Override
    public String getString(String key)
    {
        return StringVars.getVariableValue('$', ()-> getMap().get(key),(vkey)-> getMap().get(vkey));
    }
};
        
example.getMap().put("example", "Example: $var$");
example.getMap().put("var", "This is a great example of how it functions!");

System.out.println("Results: " + example.getString("example"));
Reply
 


Forum Jump:


Users browsing this thread: 1 Guest(s)

About The Bytecode Club

We're a community focused on Reverse Engineering, we try to target Java/Android but we also include other langauges/platforms. We pride ourselves in supporting and free and open sourced applications.

Website