Class StringLib

All Implemented Interfaces:
com.esotericsoftware.kryo.KryoSerializable
Direct Known Subclasses:
JseStringLib

public class StringLib extends TwoArgFunction
Subclass of LibFunction which implements the lua standard string library.

Typically, this library is included as part of a call to either

 
 Globals globals = JsePlatform.standardGlobals();
 System.out.println( globals.get("string").get("upper").call( LuaValue.valueOf("abcde") ) );
  

To instantiate and use it directly, link it into your globals table via LuaValue.load(LuaValue) using code such as:

 
 Globals globals = new Globals();
 globals.load(new JseBaseLib());
 globals.load(new PackageLib());
 globals.load(new JseStringLib());
 System.out.println( globals.get("string").get("upper").call( LuaValue.valueOf("abcde") ) );
  

This is a direct port of the corresponding library in C.

See Also: