Is there any way to store a byteString in a byteArray

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Is there any way to store a byteString in a byteArray

Suresh kumar
Hi all,

This may be stupid question, but really need an advice- Is there any way to store a byteString in a byteArray

Thanks,
-Suresh

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Is there any way to store a byteString in a byteArray

Boris Popov, DeepCove Labs (SNN)

'балала́йка' asByteArrayEncoding: #utf8

#[208 177 208 176 208 187 208 176 208 187 208 176 204 129 208 185 208 186 208 176]

 

#[208 177 208 176 208 187 208 176 208 187 208 176 204 129 208 185 208 186 208 176] asStringEncoding: #utf8

'балала́йка'

 

-Boris

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Suresh Kumar
Sent: September 17, 2013 9:22 AM
To: [hidden email]
Subject: [vwnc] Is there any way to store a byteString in a byteArray

 

Hi all,

 

This may be stupid question, but really need an advice- Is there any way to store a byteString in a byteArray

 

Thanks,

-Suresh


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Is there any way to store a byteString in a byteArray

Terry Raymond

Also, considering that it is a ByteString, you can also do     aString changeClassTo: ByteArray.

 

However, as the code Boris provided demonstrates, you really might want it encoded.

 

Terry

 

===========================================================

Terry Raymond

Crafted Smalltalk

80 Lazywood Ln.

Tiverton, RI  02878

(401) 624-4517      [hidden email]

===========================================================

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Boris Slobodin, DeepCove Labs
Sent: Tuesday, September 17, 2013 9:28 AM
To: Suresh Kumar; [hidden email]
Subject: Re: [vwnc] Is there any way to store a byteString in a byteArray

 

'балала́йка' asByteArrayEncoding: #utf8

#[208 177 208 176 208 187 208 176 208 187 208 176 204 129 208 185 208 186 208 176]

 

#[208 177 208 176 208 187 208 176 208 187 208 176 204 129 208 185 208 186 208 176] asStringEncoding: #utf8

'балала́йка'

 

-Boris

 

From: [hidden email] [[hidden email]] On Behalf Of Suresh Kumar
Sent: September 17, 2013 9:22 AM
To: [hidden email]
Subject: [vwnc] Is there any way to store a byteString in a byteArray

 

Hi all,

 

This may be stupid question, but really need an advice- Is there any way to store a byteString in a byteArray

 

Thanks,

-Suresh


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc