Rebol Talk Forum  |  Getting Started  |  Newbie Help  |  Topic: Comparing a string to (22) spaces
Pages: [1] Print
Author Topic: Comparing a string to (22) spaces  (Read 376 times)
jfdutcher
Jr. Member
**
Offline Offline

Posts: 95


View Profile
Comparing a string to (22) spaces
« on: January 23, 2007, 05:37:53 PM »


The 'append' portion of  this clip works fine.....I need to determine whether or not the piece of  'rec1' represented by the 'substr' is all  spaces....in which case I don't need to append it to the block.  I've tried many variations to create a test for that condition,  none of which have passed muster as legitimate Rebol code....the current one included of course.

How can this be done  ?
 
allergys: make block! 3   ( j has been given a value outside this clip)
space: ' '
for j 1 66 22 [
    if (substr rec1 (y + j) + 117 22 > repeat space 22) [
   append allergys trim substr rec1 (y + j) + 117 22
   ]   
]   
Logged
Graham
Full Member
***
Offline Offline

Posts: 113


View Profile
Re: Comparing a string to (22) spaces
« Reply #1 on: January 23, 2007, 07:17:38 PM »

Not sure what you're attempting here, but

empty? "--22spaces--"

should be true.
Logged

jfdutcher
Jr. Member
**
Offline Offline

Posts: 95


View Profile
Re: Comparing a string to (22) spaces
« Reply #2 on: January 23, 2007, 09:22:26 PM »

Thank you Graham.....

Empty?  passes muster very well .......

J.D.
Logged
Pages: [1] Print 
Rebol Talk Forum  |  Getting Started  |  Newbie Help  |  Topic: Comparing a string to (22) spaces
Jump to:  

  
Quick Search...

Advanced search
  
Welcome, Guest. Please login or register.
Did you miss your activation email?
October 14, 2008, 01:54:34 PM
Username: Password: Session Length:
  

News: 01-09-08

Alpha version of REBOL 3 has been released!


  
2248 Posts in 586 Topics by 2512 Members
Latest Member: Jhvdyatb

  Rebol Talk Forum | Powered by SMF 1.0.9.
© 2001-2005, Lewis Media. All Rights Reserved.

RT design by Defiant Pc