Can't use upper() method on audio.language

All your suggestions, requests and ideas for future development
Post Reply
namron
Posts: 5
Joined: 26 May 2017, 08:52

Can't use upper() method on audio.language

Post by namron »

Hi,

when I try to capitalize the audio language in the filename like {audio.language.upper()}, I get:
Image

Is this a bug or do I have to solve this another way?

Norman
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: Can't use upper() method on audio.language

Post by kim »

try {audio.language.join().upper()} or {audio.language.toString().upper()} or {audio.language[0].upper()}
User avatar
rednoah
The Source
Posts: 22991
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Can't use upper() method on audio.language

Post by rednoah »

I think you're looking for this:

Code: Select all

{audioLanguages.ISO2*.upper()}
The Groovy manual will tell you why . works only for properties and why *. works for methods and properties.
:idea: Please read the FAQ and How to Request Help.
namron
Posts: 5
Joined: 26 May 2017, 08:52

Re: Can't use upper() method on audio.language

Post by namron »

kim wrote: 16 Jun 2017, 16:51 try {audio.language.join().upper()} or {audio.language.toString().upper()} or {audio.language[0].upper()}
Ok, so audio.language is an array.

Works as want it to with {audio.language[0].upper()}.

Thanks
Post Reply