[Seaside] Smalltalk String and Character question

Dmitry Dorofeev dima-sender-3c337a at yasp.com
Sat Mar 19 22:18:50 CET 2005

Hi all,

just writting WAImage component for Seaside. Now at stage where i need 
to detect image type.
For jpeg i have the following:

WAImage >> detectImageType: image
(image beginsWith: (String with: 16rFF asCharacter), (String with: 
16rD8 asCharacter)) ifTrue: [^ 'jpg'].

Looks quite long comparing to Perl, i know there should be a shorter 
solution :-)
Please help a newbie.



More information about the Seaside mailing list