Xojo Conferences
XDCMay2019MiamiUSA

strings (Real Studio Plugins Mailinglist archive)

Back to the thread list
Previous thread: FW: speed
Next thread:


Re: class extensions...   -   Jan Erik Moström <
  strings   -   Alexander Cohen
   Re: strings   -   Joseph J. Strout
    Re: strings   -   Alexander Cohen
     Re: strings   -   Christian Schmitz
     Re: strings   -   Joseph J. Strout
    Re: strings   -   Thomas Tempelmann
     Re: strings   -   Alexander Cohen

strings
Date: 23.09.02 15:41 (Mon, 23 Sep 2002 10:41:38 -0400)
From: Alexander Cohen
I receive a buffer (void*) through a callback in a plugin. I want to
send this buffer to RB. So i typecast it to char* and Build a
REALstring.

The problem is, if there are any nil characters in the void*, the c
string i get by typecasting will only be until the nul char. So,
actually, my question might be, how can i print to any output a buffer
that won't stop output at a nil char?

Re: strings
Date: 23.09.02 16:41 (Mon, 23 Sep 2002 08:41:14 -0700)
From: Joseph J. Strout
At 10:41 AM -0400 9/23/02, Alexander Cohen wrote:

>The problem is, if there are any nil characters in the void*, the c
>string i get by typecasting will only be until the nul char. So,
>actually, my question might be, how can i print to any output a
>buffer that won't stop output at a nil char?

Use REALBuildString (assuming that by "print to any output" you mean
"construct a REALbasic string"). And there are no C strings involved
here, and probably not any typecasting either.

Cheers,
- Joe

Re: strings
Date: 23.09.02 17:00 (Mon, 23 Sep 2002 12:00:08 -0400)
From: Alexander Cohen

On Monday, September 23, 2002, at 11:41 AM, Joseph J. Strout wrote:

> At 10:41 AM -0400 9/23/02, Alexander Cohen wrote:
>
>> The problem is, if there are any nil characters in the void*, the c
>> string i get by typecasting will only be until the nul char. So,
>> actually, my question might be, how can i print to any output a
>> buffer that won't stop output at a nil char?
>
> Use REALBuildString (assuming that by "print to any output" you mean
> "construct a REALbasic string"). And there are no C strings involved
> here, and probably not any typecasting either.

Ok, that's works fine! But what if i want to output it to the console
or any other ouput?

Re: strings
Date: 23.09.02 17:22 (Mon, 23 Sep 2002 18:22:02 +0200)
From: Christian Schmitz
> Ok, that's works fine! But what if i want to output it to the console
> or any other ouput?

If you give a string to anything what uses cstrings, you'll have to
remove chr(0) before sending.

Mfg
Christian

Re: strings
Date: 23.09.02 17:23 (Mon, 23 Sep 2002 09:23:39 -0700)
From: Joseph J. Strout
At 12:00 PM -0400 9/23/02, Alexander Cohen wrote:

>Ok, that's works fine! But what if i want to output it to the
>console or any other ouput?

Then you'll have to investigate the calls available for those outputs.

Best,
- Joe

Re: strings
Date: 23.09.02 18:47 (Mon, 23 Sep 2002 10:47:11 -0700)
From: Thomas Tempelmann
Alexander Cohen wrote:

> nil characters

Note: NIL is a TLA for Not In List. What you mean is a NULL (or NUL)
character :)

Thomas

---
A searchable archive of this list is available at:
<http://dbserver.realsoftware.com/KBDB/search.php>

Unsubscribe:
<mailto:<email address removed>>

Subscribe to the digest:
<mailto:<email address removed>>

Re: strings
Date: 23.09.02 19:25 (Mon, 23 Sep 2002 14:25:14 -0400)
From: Alexander Cohen
Oh, ok! Sorry for the confusion!