Last active
April 11, 2018 20:53
-
-
Save animoplex/f3d8b95b1729a986b80183830385e6eb to your computer and use it in GitHub Desktop.
Output Layer Name As Substring - After Effects Expression by Animoplex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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