Count Characters in String

Is there a way to count the number of characters in a string, other than copy/paste into Word, Notepad++, etc.? I’m tinkering around with directories and I want the file names but not the entire directory path, so I need to remove N number of characters, but the path could vary. I’m not seeing anything to do it directly but that doesn’t mean much some days :rofl:

example:
_F:\Dynamo\Scripts_ = 18 characters
_\Server\Dynamo\Scripts_ = 24 characters

@Chad_Clary The core node String.Length counts number of characters :slight_smile:

http://dictionary.dynamobim.com/#/Core/String/Action/Length

Thanks! I kept searching for count related nodes… :blush:

@Chad_Clary D’oh, I was thinking too much of your actual question and realize I should have mentioned the FilePath.FileName node - this will give you the file names: http://dictionary.dynamobim.com/#/Core/File/FilePath/Action/FileName

Sweet! That is a lot easier than trimming strings down. Thanks! :beers: