ODBiC Discussion Board

RE: Case Insensitive Replace?, Tim Logan, 04-13-2007

No way to do it now, but I'll add it to the wishlist

by Roger Harris, April 18, 2007 12:49

Of course, you can case-shift the input string directly in the function, e.g. $repl($lcase($input),...), so all the replacement tests can then be lowercase, but that's probably not what you want to do unless you can live with the output being all lowercase. Using $lcase( ) or $ucase( ) is also sometimes necessary to do case-insensitive comparisons (e.g. IF $lcase($input$) = "yes" works even if $input$ is "Yes"), but of course that doesn't change the value of the variable, whereas using $lcase( ) in the $repl( ) will shift the whole output string.


Post Your Reply:

E-mail  optional

HTTP Link: 
Link text: 


Copyright ©1997-2003, Roger Harris. All rights reserved.