Ir para conteúdo
Fórum Script Brasil
  • 0

Função Para Verificar Se O Caracter Digitado é Um Número?


Tamanini

Pergunta

4 respostass a esta questão

Posts Recomendados

  • 0

Felipe recomenda:

isalnum

#include <cctype>

int isalnum(int ch);

The isalnum() function returns nonzero if its argument is either a letter of the

alphabet or a digit. If the character is not alphanumeric, zero is returned.

Related functions are isalpha() , iscntrl() , isdigit() , isgraph() , isprint() , ispunct() ,

and isspace() .

isalpha

#include <cctype>

int isalpha(int ch);

The isalpha() function returns nonzero if ch is a letter of the alphabet; otherwise

zero is returned. What constitutes a letter of the alphabet may vary from language to

language. For English, these are the upper- and lowercase letters A through Z.

Related functions are isalnum() , iscntrl() , isdigit() , isgraph() , isprint() , ispunct() ,

and isspace() .

iscntrl

#include <cctype>

int iscntrl(int ch);

The iscntrl() function returns nonzero if ch is between zero and 0x1F or is equal to

0x7F (DEL); otherwise zero is returned.

Related functions are isalnum() , isalpha() , isdigit() , isgraph() , isprint() , ispunct() ,

and isspace() .

isdigit

#include <cctype>

int isdigit(int ch);

The isdigit() function returns nonzero if ch is a digit, that is, 0 through 9. Otherwise

zero is returned.

Related functions are isalnum() , isalpha() , iscntrl() , isgraph() , isprint() , ispunct() ,

and isspace() .

isgraph

#include <cctype>

int isgraph(int ch);

The isgraph() function returns nonzero if ch is any printable character other than a

space; otherwise zero is returned. Printable characters are generally in the range 0x21

through 0x7E.

Related functions are isalnum() , isalpha() , iscntrl() , isdigit() , isprint() , ispunct() ,

and isspace() .

islower

#include <cctype>

int islower(int ch);

The islower() function returns nonzero if ch is a lowercase letter; otherwise zero

is returned.

A related function is isupper() .

isprint

#include <cctype>

int isprint(int ch);

The isprint() function returns nonzero if ch is a printable character, including a

space; otherwise zero is returned. Printable characters are often in the range 0x20

through 0x7E.

Related functions are isalnum() , isalpha() , iscntrl() , isdigit() , isgraph() , ispunct() ,

and isspace() .

ispunct

#include <cctype>

int ispunct(int ch);

The ispunct() function returns nonzero if ch is a punctuation character; otherwise

zero is returned. The term "punctuation," as defined by this function, includes all

printing characters that are neither alphanumeric nor a space.

Related functions are isalnum() , isalpha() , iscntrl() , isdigit() , isgraph() , and

isspace() .

isspace

#include <cctype>

int isspace(int ch);

The isspace() function returns nonzero if ch is either a space, horizontal tab,

vertical tab, formfeed, carriage return, or newline character; otherwise zero is returned.

Related functions are isalnum() , isalpha() , iscntrl() , isdigit() , isgraph() , and

ispunct() .

isupper

#include <cctype>

int isupper(int ch);

The isupper() function returns nonzero if ch is an uppercase letter; otherwise zero

is returned.

A related function is islower() .

isxdigit

#include <cctype>

int isxdigit(int ch);

The isxdigit() function returns nonzero if ch is a hexadecimal digit; otherwise zero

is returned. A hexadecimal digit will be in one of these ranges: A–F, a–f, or 0–9.

Related functions are isalnum() , isalpha() , iscntrl() , isdigit() , isgraph() , ispunct() ,

and isspace() .

Retirado do Osborne C++ - The Complete Reference (3rd Ed.), pág. 720

Editado por Felipe Pedroso
Link para o comentário
Compartilhar em outros sites

Participe da discussão

Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.



  • Estatísticas dos Fóruns

    • Tópicos
      152,1k
    • Posts
      651,8k
×
×
  • Criar Novo...