Author Topic: Code templates: How can I be case-aware?  (Read 2941 times)

austin_hastings

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • I love YaBB 1 Gold!
    • View Profile
Code templates: How can I be case-aware?
« on: September 19, 2005, 05:13:06 pm »
Howdy,

I'm trying to detect a case-sensitive condition in some PHP code templates, and I discovered this:

%if "b" != "B"%
I am case sensitive.
%else%
I am not case sensitive.
%endIf%

The template machinery is not case sensitive.

Can someone tell me how to sensitize my code to case?

=Austin

austin_hastings

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • I love YaBB 1 Gold!
    • View Profile
Re: Code templates: How can I be case-aware?
« Reply #1 on: September 19, 2005, 05:18:25 pm »
PS:

I've got this, already:

Code: [Select]

$firstLetter = %LEFT(paramType, 1)%
$fluc = %FIND("ABCDEFGHIJKLMNOPQRSTUVWXYZ", $firstLetter)%
%if $fluc != "-1"%
First Letter is Upper Case!
%endIf%


But I downloaded the unicode version for a reason... :(

=Austin