Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ctype_lower(3) [php man page]

CTYPE_LOWER(3)								 1							    CTYPE_LOWER(3)

ctype_lower - Check for lowercase character(s)

SYNOPSIS
bool ctype_lower (string $text) DESCRIPTION
Checks if all of the characters in the provided string, $text, are lowercase letters. PARAMETERS
o $text - The tested string. RETURN VALUES
Returns TRUE if every character in $text is a lowercase letter in the current locale. EXAMPLES
Example #1 A ctype_lower(3) example (using the default locale) <?php $strings = array('aac123', 'qiutoas', 'QASsdks'); foreach ($strings as $testcase) { if (ctype_lower($testcase)) { echo "The string $testcase consists of all lowercase letters. "; } else { echo "The string $testcase does not consist of all lowercase letters. "; } } ?> The above example will output: The string aac123 does not consist of all lowercase letters. The string qiutoas consists of all lowercase letters. The string QASsdks does not consist of all lowercase letters. NOTES
Note If an integer between -128 and 255 inclusive is provided, it is interpreted as the ASCII value of a single character (negative val- ues have 256 added in order to allow characters in the Extended ASCII range). Any other integer is interpreted as a string contain- ing the decimal digits of the integer. SEE ALSO
ctype_alpha(3), ctype_upper(3), setlocale(3). PHP Documentation Group CTYPE_LOWER(3)

Check Out this Related Man Page

CTYPE_PUNCT(3)								 1							    CTYPE_PUNCT(3)

ctype_punct - Check for any printable character which is not whitespace or an alphanumeric character

SYNOPSIS
bool ctype_punct (string $text) DESCRIPTION
Checks if all of the characters in the provided string, $text, are punctuation character. PARAMETERS
o $text - The tested string. RETURN VALUES
Returns TRUE if every character in $text is printable, but neither letter, digit or blank, FALSE otherwise. EXAMPLES
Example #1 A ctype_punct(3) example <?php $strings = array('ABasdk!@!$#', '!@ # $', '*&$()'); foreach ($strings as $testcase) { if (ctype_punct($testcase)) { echo "The string $testcase consists of all punctuation. "; } else { echo "The string $testcase does not consist of all punctuation. "; } } ?> The above example will output: The string ABasdk!@!$# does not consist of all punctuation. The string !@ # $ does not consist of all punctuation. The string *&$() consists of all punctuation. NOTES
Note If an integer between -128 and 255 inclusive is provided, it is interpreted as the ASCII value of a single character (negative val- ues have 256 added in order to allow characters in the Extended ASCII range). Any other integer is interpreted as a string contain- ing the decimal digits of the integer. SEE ALSO
ctype_cntrl(3), ctype_graph(3). PHP Documentation Group CTYPE_PUNCT(3)
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

wc -c

Hi, When I use wc -c : echo "word" |wc -c 5 The number is number of letters +1 I don't understand... Where is the probleme? I am on AIX but on HP, it the same probleme. (5 Replies)
Discussion started by: Castelior
5 Replies

2. Shell Programming and Scripting

How can I find the 3 first letters from the name file

Hello, I have a name file in Unix for example : ABC_TODAYFirst.001 and I want just capture or display the 3 first letters so : ABC. I tried with cut -c,1-3 and the name but it displays the 3 first letters of all lines. Can you help , Thanks a lot (8 Replies)
Discussion started by: steiner
8 Replies

3. Shell Programming and Scripting

If condition is -lt than 5 letters trouble.

Hi, In an If condition, how can I specify if the variable are less than 5 letters, echo “error”. Something like this one: echo –n “Your name please: “ read name if ; then Echo “Your name must be at least 5 letters length” exit fi Thanks a lot… (6 Replies)
Discussion started by: TARFU
6 Replies

4. Shell Programming and Scripting

Checking if string contains integer

G'day guys, first post so be gentle. I need help with some code to work out if a variable (string) contains any integers. The valid variable (string) must contain only letters. Also need to be able to work out if a variable contains only integers. Any help greatly appreciated. (7 Replies)
Discussion started by: haz
7 Replies

5. Shell Programming and Scripting

ultra simple question

hey, i want to use tr to remove all the lowercase characters from a string and replace them with a '.', i can't seem to get it to work, heres an example of what im trying, someone please correct me : tr . (7 Replies)
Discussion started by: vbm
7 Replies

6. UNIX for Dummies Questions & Answers

Need to change filenames in a particular directory from lowercase to UPPERCASE

Hi, I need a shell script which changes a bunch of files in a particular directory from lowercase to UPPERCASE. I am not very familiar with shell scripts so a detailed explanation would be greatly appreciated!!!! Thanks ini advance! :) (7 Replies)
Discussion started by: Duke_Lukem
7 Replies

7. UNIX for Advanced & Expert Users

Deleting First 10 letters in a line

Hi, Could any one of you let me know any simple Unix command for deleting first 10 letters of first line in unix? Eg: 123456789ABC --Input ABC--Output Thanks Sue (9 Replies)
Discussion started by: pyaranoid
9 Replies

8. UNIX for Dummies Questions & Answers

how to check if a string consist of any space?

hi all how do i check if a string consist of any space by using shell script. i have the following code while test -z $string do //prompting for another string if string is length 0 done when i type "a b" it give me an error test: a: binary operator expected thanks (7 Replies)
Discussion started by: yang
7 Replies

9. Shell Programming and Scripting

Count lowercase in a word

I have a file like: aabbccddDDCCDDCCaabbcc 123 CCaaCCBBCCaaaaaaaCCCaa 234 CCDDCCAACCCCccccccccaa 999 I'd like to print out the 1st word followed by the number of lowercase characters in that word. The words only consist of a few letters. I was trying something like awk... (6 Replies)
Discussion started by: dcfargo
6 Replies

10. Shell Programming and Scripting

Parsing out the logs and generating report

My file will contain following(log.txt): start testcase: config loading ...... error XXXX ..... end testcase: config loading, result failed start testcase: ping check ..... error ZZZZZ ..... error AAAAA end testcase: Ping check, result failed I am expecting below output. ... (4 Replies)
Discussion started by: shellscripter
4 Replies

11. Shell Programming and Scripting

Replace lower case letters with N

Hi, I have a string of letters that are upper and lower case. I would like to replace all the lowercase letters with N. Also, there are only 4 letters, so it may be easier to replace each lower case letter with N. Either way, I do not know know to do this. Example line ... (6 Replies)
Discussion started by: mikey11415
6 Replies

12. Shell Programming and Scripting

sed command, look for numbers following letters

If I have a set of strings, C21 F231 H42 1C10 1F113 and I want to isolate the ints following the char, what would the sed string be to find numbers after letters? If I do, *, I will get numbers after letters, but I am looking to do something like, sed 's/*/\t*/g' this will give me... (14 Replies)
Discussion started by: LMHmedchem
14 Replies

13. Shell Programming and Scripting

Extended replacing of nonspecific strings in text files [beware complicated !]

Well, to make another post at this helpful forum :b::D: I recently tried something like this, I want to replace all those numberings/letters that are located between <string>file://localhost/var/mobile/Applications/ and /Documents/</string> numberings =---- replace with: first... (6 Replies)
Discussion started by: pasc
6 Replies

14. Homework & Coursework Questions

passing letters from an array into a string for string comparison

attempting the hangman program. This was an optional assignment from the professor. I have completed the logical coding, debugging now. ##I have an array $wordString that initializes to a string of dashes ##reflecting the number of letters in $theWord ##every time the user enters a (valid)... (5 Replies)
Discussion started by: lotsofideas
5 Replies

15. UNIX for Dummies Questions & Answers

Sort concept confusion

By default, sort reorders lines in ASCII collating sequence --- whitespace first, then numerals,uppercase letters and finally lowercase letters. Shellscript:cat sort.txt aaa bbb ddd AAA eee GGG ggg Shellscript:sort sort.txt aaa AAA bbb ddd eee ggg GGG Why the default output... (6 Replies)
Discussion started by: shellscripting
6 Replies