您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ zstr函数代码示例

51自学网 2021-06-03 12:02:23
  C++
这篇教程C++ zstr函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中zstr函数的典型用法代码示例。如果您正苦于以下问题:C++ zstr函数的具体用法?C++ zstr怎么用?C++ zstr使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了zstr函数的27个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: opus_load_config

static switch_status_t opus_load_config(switch_bool_t reload){	char *cf = "opus.conf";	switch_xml_t cfg, xml = NULL, param, settings;	switch_status_t status = SWITCH_STATUS_SUCCESS;    	if (!(xml = switch_xml_open_cfg(cf, &cfg, NULL))) {		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Opening of %s failed/n", cf);		return status;	}    	if ((settings = switch_xml_child(cfg, "settings"))) {		for (param = switch_xml_child(settings, "param"); param; param = param->next) {			char *key = (char *) switch_xml_attr_soft(param, "name");			char *val = (char *) switch_xml_attr_soft(param, "value");						if (!strcasecmp(key, "use-vbr") && !zstr(val)) {				opus_prefs.use_vbr = atoi(val);			} else if (!strcasecmp(key, "complexity")) {				opus_prefs.complexity = atoi(val);			} else if (!strcasecmp(key, "maxaveragebitrate")) {				opus_prefs.maxaveragebitrate = atoi(val);				if ( opus_prefs.maxaveragebitrate < 6000 || opus_prefs.maxaveragebitrate > 510000 ) {					opus_prefs.maxaveragebitrate = 0; /* values outside the range between 6000 and 510000 SHOULD be ignored */				}			} else if (!strcasecmp(key, "maxplaybackrate")) {				opus_prefs.maxplaybackrate = atoi(val);				if ( opus_prefs.maxplaybackrate != 8000 && opus_prefs.maxplaybackrate != 12000 && opus_prefs.maxplaybackrate != 16000							&& opus_prefs.maxplaybackrate != 24000 && opus_prefs.maxplaybackrate != 48000) {					opus_prefs.maxplaybackrate = 0; /* value not supported */				}			}		}	}        if (xml) {        switch_xml_free(xml);    }        return status;}
开发者ID:utkarsh301994,项目名称:localhost,代码行数:41,


示例2: initialise_ei

switch_status_t initialise_ei(struct ei_cnode_s *ec){	char thisnodename[MAXNODELEN + 1];	char thisalivename[MAXNODELEN + 1];	char *atsign;	if (zstr(listen_list.hostname) || !strncasecmp(prefs.ip, "0.0.0.0", 7) || !strncasecmp(prefs.ip, "::", 2)) {		listen_list.hostname=(char *) switch_core_get_hostname();	}	if (strlen(listen_list.hostname) > EI_MAXHOSTNAMELEN) {		*(listen_list.hostname+EI_MAXHOSTNAMELEN) = '/0';	}	/* copy the prefs.nodename into something we can modify */	strncpy(thisalivename, prefs.nodename, MAXNODELEN);	if ((atsign = strchr(thisalivename, '@'))) {		/* we got a qualified node name, don't guess the host/domain */		snprintf(thisnodename, MAXNODELEN + 1, "%s", prefs.nodename);		/* truncate the alivename at the @ */		*atsign = '/0';	} else {		if (prefs.shortname) {			char *off;			if ((off = strchr(listen_list.hostname, '.'))) {				*off = '/0';			}		}		snprintf(thisnodename, MAXNODELEN + 1, "%[email
C++ zstr_send函数代码示例
C++ zsocket_new函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。