Meteor 2 Scripting Functions
String
string string::lower(string str)
Convert a string to lower case.

Example
string str = "Wise One";
print(str.lower());

See also
string::upper

string string::upper(string str)
Convert a string to upper case.

Example
string str = "Wise One";
print(str.upper());

See also
string::lower

string extractFilename(string path)
Return the file name part only from a path string.

Example
string path = "testfile.mus";
string filename = extractFilename(path);
print(filename); // "testfile.mus"

See also
replaceFilename extractPath extractFileExtension replaceFileExtension

string replaceFilename(string path)
Replace the file name part only from a path string.

Example
string path = "base\\music\\testfile.mus";
string newPath = replaceFilename(path, "hello.mus");
print(newPath); // "base\music\hello.mus"

See also
extractFilename extractPath extractFileExtension replaceFileExtension

string extractPath(string path)
Return the path part only from a path string.

Example
string path = "base\\music\\testfile.mus";
string pathOnly = extractPath(path);
print(pathOnly); // "base\music\"

See also
extractFilename replaceFilename extractFileExtension replaceFileExtension

string extractFileExtension(string path)
Return the file name part only from a path string.

Example
string path = "testfile.mus";
string fileExtension = extractFileExtension(path);
print(fileExtension); // "mus"

See also
extractFilename replaceFilename extractPath replaceFileExtension

string replaceFileExtension(string path, string newExtension)
Return the file name part only from a path string.

Example
string path = "testfile.mus";
string newPath = replaceFileExtension(path, "txt");
print(newPath); // "testfile.txt"

See also
extractFilename replaceFilename extractPath extractFileExtension


Index