Skip to content. Skip to navigation

ICTP Portal

Sections
You are here: Home Manuals on-line PGI Compiler pgC_lib isalnum
Personal tools
Document Actions

isalnum



Click on the banner to return to the class reference home page.

isalnum


Locale Convenience Function

Summary

Determines if a character is alphabetic or numeric.

Data Type and Member Function Indexes
(exclusive of constructors and destructors)

None

Synopsis

#include <locale>
template <class charT> 

bool isalnum (charT c, const locale& loc) const;

Description

The isalnum function returns true if the character passed as a parameter is either part of the alphabet specified by the locale parameter or a decimal digit, otherwise the function returns false. The check is made using the ctype facet from the locale parameter.

Example

//
// isalnum.cpp
//

#include <iostream>

int main ()
{
  using namespace std;

  locale loc;
  
  cout << isalnum('a',loc) << endl;
  cout << isalnum(',',loc) << endl;
  
  return 0;
}

See Also

other is_ functions, locale, ctype


©Copyright 1996, Rogue Wave Software, Inc.


Powered by Plone This site conforms to the following standards: