His code is checking for any character(s) followed by a character that is not a number, followed by any character(s). I think you've missed seeing the bang (!) which implies not 0-9:
So it will issue an error if the string has any character that isn't an error, or is empty.
If you miss that, then yes it is confusing.
Last edited by agama; 07-29-2011 at 11:16 PM..
Reason: clarification
suppose a name is read
how to check whether the name contains only alphabets and space
not non-alphabetic characters and special characters (5 Replies)
This is the code and I'm wondering why line 14: a = ... and line 16: b = ... is wrong.
This is the first time I've tried to use this. Please help me.
#include <stdio.h>
#include <math.h>
// The link and how the double pow is used.
//
// http://www.nextdawn.nl/c-reference/pow.php
//... (2 Replies)
Executed the following if conditions .. and got different results .
only (( )) gave correct o/p with all scenarios .
Can anybody please let me know what is the difference between and ] and ((condition)) when used with if condition.
And why each condition gave different result.
1.... (2 Replies)
Hi,
I have data as
"01/22/97-"aaaaaaaaaaaaaaaaa""aaa""aabbbbbbbbcccccc""zbcd""dddddddddeeeeeeeeefffffff"
I want to remove only the Consequitive double quotes and not the one which occurs single.
My O/P must be ... (2 Replies)
hi,
I have some problems in my simple script about the redirect echo stdout command inside a condition. Why is the echo command inside the elif still execute in the else command
Here are my simple script
After check on the two diff output the echo stdout redirect is present in two diff... (3 Replies)
HI
My doubt may be basic one but I need to get it clarified..
When i use "if" condition that checks for many AND, OR logical conditions
like
if ]; then
return 0
fi
Even the if condition fails it returns as zero.. Any clue..
But if i add else condition like
if ]; ... (2 Replies)
Hi Froum.
I have tried in vain to find a solution for this problem - I'm trying to replace any double quotes within a quoted string with a single quote, leaving everything else as is.
I have the following data:
Before:
... (32 Replies)
Hi All ,
We have source data file as csv file and since data could contain commas ,each attribute is quoted into double quotes.However problem is that some of the attributa data also contain double quotes which is converted to double double quote while creating csv file
XLs data :
... (2 Replies)
Hi All,
I'm unable to load the data using sql loader where there are double quotes within the double quotes As these are optionally enclosed by double quotes.
Sample Data :
"221100",138.00,"D","0019/1477","44012075","49938","49938/15043000","Television - 22" Refurbished - Airwave","Supply... (6 Replies)
Discussion started by: mlavanya
6 Replies
LEARN ABOUT SUNOS
wcswidth
wcswidth(3C) Standard C Library Functions wcswidth(3C)NAME
wcswidth - number of column positions of a wide-character string
SYNOPSIS
#include <wchar.h>
int wcswidth(const wchar_t *pwcs, size_t n);
DESCRIPTION
The wcswidth() function determines the number of column positions required for n wide-character codes (or fewer than n wide-character codes
if a null wide-character code is encountered before n wide-character codes are exhausted) in the string pointed to by pwcs.
RETURN VALUES
The wcswidth() function either returns 0 (if pwcs points to a null wide-character code), or returns the number of column positions to be
occupied by the wide-character string pointed to by pwcs, or returns -1 (if any of the first n wide-character codes in the wide-character
string pointed to by pwcs is not a printing wide-character code).
ERRORS
No errors are defined.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|CSI |Enabled |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe with exceptions |
+-----------------------------+-----------------------------+
SEE ALSO setlocale(3C), wcwidth(3C), attributes(5), standards(5)SunOS 5.10 14 Aug 2002 wcswidth(3C)