C Tutorial/stdlib.h/mblen — различия между версиями


Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Creation of dynamic property PPDStack::$accum is deprecated in /var/www/cppe.ru/www/includes/parser/Preprocessor_DOM.php on line 803

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179

Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48
Материал из C\C++ эксперт
Перейти к: навигация, поиск
м (1 версия: Импорт контента...)
 
(нет различий)

Версия 14:21, 25 мая 2010

mblen

Item Value Header file stdlib.h Declaration int mblen(const char *str, size_t size); Function returns the length (in bytes) of a multibyte character pointed to by str. Only the first size number of characters are examined. It returns -1 on error. Return If str is null, then mblen() returns nonzero if multibyte characters have state-dependent encodings. If they do not, zero is returned.


#include <stdlib.h>
  #include <stdio.h>
  int main(void){
     char *md = "asdfasdf";
     printf("%d", mblen(md, 2));
  }