Ends With
Ends With using For
Summary: Processes stress data folders by removing trailing slashes and updating the folder paths.
Code:
stressSpaceKey = "JMPPOOLSTRESSTESTING";
stressDataFolders = {"$SAMPLE_DATA"};
mapDataFolder = "$MAPS";
For( i = 1, i <= Length( stressDataFolders ), i++,
If( Ends With( stressDataFolders[i], "/" ) | Ends With( stressDataFolders[i], "\" ),
stressDataFolders[i] = Substr( stressDataFolders[i], 1, Length( stressDataFolders[i] ) - 1 )
)
);
Code Explanation:
- Set
stressSpaceKey. - Define
stressDataFolders. - Define
mapDataFolder. - Loop through
stressDataFolders. - Check if folder ends with
/or ``. - Remove trailing
/or ``. - End loop.