TagLib::String to char?

View: New views
4 Messages — Rating Filter:   Alert me  

TagLib::String to char?

by Christian EJlertsen-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Everybody
I know this is a newbie coder question so i thank you for your patience
in advance,
Is there any way to cast convert TagLib::String to a char, const char?
If so how could the below look if it should work?

--
char *buf2 = new char[tag->artist().length()];
 strcpy(buf2, tagCastedToChar);
--

Thank you in advance
Christian



_______________________________________________
taglib-devel mailing list
taglib-devel@...
https://mail.kde.org/mailman/listinfo/taglib-devel

Re: TagLib::String to char?

by Sander Jansen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

 Look in taglib/tstring.h, you can always try using "toCString"...

Cheers,
Sander

On Thu, Mar 27, 2008 at 10:35 AM, Christian EJlertsen <ce@...> wrote:

> Hello Everybody
>  I know this is a newbie coder question so i thank you for your patience
>  in advance,
>  Is there any way to cast convert TagLib::String to a char, const char?
>  If so how could the below look if it should work?
>
>  --
>  char *buf2 = new char[tag->artist().length()];
>   strcpy(buf2, tagCastedToChar);
>  --
>
>  Thank you in advance
>  Christian
>
>
>
>  _______________________________________________
>  taglib-devel mailing list
>  taglib-devel@...
>  https://mail.kde.org/mailman/listinfo/taglib-devel
>
_______________________________________________
taglib-devel mailing list
taglib-devel@...
https://mail.kde.org/mailman/listinfo/taglib-devel

Re: TagLib::String to char?

by Chris Verwymeren :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On 27-Mar-08, at 10:35 AM, Christian EJlertsen wrote:

> Hello Everybody
> I know this is a newbie coder question so i thank you for your  
> patience
> in advance,
> Is there any way to cast convert TagLib::String to a char, const char?
> If so how could the below look if it should work?

Please look at the documentation.

http://developer.kde.org/~wheeler/taglib/api/classTagLib_1_1String.html

_______________________________________________
taglib-devel mailing list
taglib-devel@...
https://mail.kde.org/mailman/listinfo/taglib-devel

Re: TagLib::String to char?

by Christian EJlertsen-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



Thank you all very much that was exactly what i was looking for.

Regards
Christian

>  Look in taglib/tstring.h, you can always try using "toCString"...
>
> Cheers,
> Sander
>
> On Thu, Mar 27, 2008 at 10:35 AM, Christian EJlertsen <ce@...> wrote:
>  
>> Hello Everybody
>>  I know this is a newbie coder question so i thank you for your patience
>>  in advance,
>>  Is there any way to cast convert TagLib::String to a char, const char?
>>  If so how could the below look if it should work?
>>
>>  --
>>  char *buf2 = new char[tag->artist().length()];
>>   strcpy(buf2, tagCastedToChar);
>>  --
>>
>>  Thank you in advance
>>  Christian
>>
>>
>>
>>  _______________________________________________
>>  taglib-devel mailing list
>>  taglib-devel@...
>>  https://mail.kde.org/mailman/listinfo/taglib-devel
>>
>>    
> _______________________________________________
> taglib-devel mailing list
> taglib-devel@...
> https://mail.kde.org/mailman/listinfo/taglib-devel
>  

_______________________________________________
taglib-devel mailing list
taglib-devel@...
https://mail.kde.org/mailman/listinfo/taglib-devel
LightInTheBox - Buy quality products at wholesale price!