Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Output Layer Name As Substring - After Effects Expression by Animoplex
// Output Layer Name As Substring - Created by Animoplex: www.animoplex.com
// Output Last Character
lst = name.substr(name.length-1, name.length);
// Output First Character
lst = name.substr(0, 1);
// Output All Except First Two Characters
lst = name.substr(2, name.length);
// Other String Methods:
// Outputs 2 characters, starting after the first character.
myString.substr(1, 2)
// Outputs everything after the first character, through the second character.
myString.substring()
// Converts the string to all uppercase letters.
myString.toUpperCase()
// Converts the string to all lowercase letters.
myString.toLowerCase()
// Returns the last character of a string.
myString.slice(-1)
// Returns a string as an array with items split at the specified character.
myString.split("-")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment