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 characterSYNOPSIS
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)