当前位置: 首页>>代码示例>>C++>>正文


C++ t_Str::getLength方法代码示例

本文整理汇总了C++中t_Str::getLength方法的典型用法代码示例。如果您正苦于以下问题:C++ t_Str::getLength方法的具体用法?C++ t_Str::getLength怎么用?C++ t_Str::getLength使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在t_Str的用法示例。


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

示例1:

t_Str::t_Str(const t_Str &str, size_t start, size_t chars)
{
	init();
	char *ptr = str.getText();
	size_t len = str.getLength();

	if(start >= len)
		return;

	ptr += start;
	len -= start;
	
	if(chars >= len)
		chars = len;

	set(ptr, chars);
}
开发者ID:embeddedspecialist,项目名称:RaspyMonitor,代码行数:17,代码来源:string++.cpp

示例2: copy

void t_Str::copy(const t_Str &original)
{
	clear();

	if(original.getLength() < minsize)
	{
		content.ministring.length = (unsigned)original.getLength();
		memmove(content.ministring.text, original.getText(), original.getLength() + 1);
		content.ministring.big = false;
		return;
	}

//	ptr = original.getText();
	content.bigstring.length = original.getLength();
	content.bigstring.size = setSize(original.getLength() + 1);
	content.bigstring.text = getSpace(content.bigstring.size);
	content.ministring.big = true;
	memmove(content.bigstring.text, original.getText(), original.getLength() + 1);
}
开发者ID:embeddedspecialist,项目名称:RaspyMonitor,代码行数:19,代码来源:string++.cpp

示例3: search

bool t_Str::operator*=(const t_Str &s1) const
{
	return search(s1.getText(), s1.getLength()) != npos;
}
开发者ID:embeddedspecialist,项目名称:RaspyMonitor,代码行数:4,代码来源:string++.cpp

示例4: rfind

size_t t_Str::rfind(const t_Str &str, size_t ind) const
{
	return rfind(str.getText(), ind, str.getLength());
}
开发者ID:embeddedspecialist,项目名称:RaspyMonitor,代码行数:4,代码来源:string++.cpp

示例5: find

size_t t_Str::find(const t_Str &str, size_t ind, unsigned instance) const
{
	return find(str.getText(), ind, str.getLength(), instance);
}
开发者ID:embeddedspecialist,项目名称:RaspyMonitor,代码行数:4,代码来源:string++.cpp

示例6: count

unsigned t_Str::count(const t_Str &str, size_t ind) const
{
	return count(str.getText(), ind, str.getLength());
}
开发者ID:embeddedspecialist,项目名称:RaspyMonitor,代码行数:4,代码来源:string++.cpp

示例7: append

void t_Str::append(const t_Str &str)
{
	append(str.getText(), str.getLength());
}
开发者ID:embeddedspecialist,项目名称:RaspyMonitor,代码行数:4,代码来源:string++.cpp

示例8: set

void t_Str::set(const t_Str &str)
{
	set(str.getText(), str.getLength());
}
开发者ID:embeddedspecialist,项目名称:RaspyMonitor,代码行数:4,代码来源:string++.cpp

示例9: insert

void t_Str::insert(size_t start, const t_Str &s)
{
	insert(start, s.getText(), s.getLength());
}
开发者ID:embeddedspecialist,项目名称:RaspyMonitor,代码行数:4,代码来源:string++.cpp


注:本文中的t_Str::getLength方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。