Board Thread:Support Requests - Getting Technical/@comment-4654623-20150920032257/@comment-4654623-20150921165426

Spottra wrote: The padleft actually should remove the trailing space (that is all it is there for). With no second argument it strips the leading and trailing spaces of the passed string, and pads 0 spaces to the left side. In my testing it worked just fine; were you seeing the output differently?

Here was my test using "Yeti (Location Boss)" as the PAGENAME and surrounding the output with "beginning~" and "~end" to see if there are any trailing spaces: beginning~~end beginning~~end

As you can see, no trailing space.

Sorry Spottra, my mistake. I copied your string exactly at the bottom of my template (with output here). I then copied it again but this time omitted the padleft to see what difference it made Because I had not added a trailing character I could not see that there was no extra space character on the end of your original version. The documentation for padleft does not explicitly mention that it removes leading and trailing spaces.

I have also done a version using #Explode which is a little more compact.

I still can't figure out why I can't use them as the default values for bossname and bosstype though, any ideas?