In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
What this article shares with you is about the implementation of string class functions. The editor thinks it is very practical, so I share it with you. I hope you can get something after reading this article. Let's take a look at it with the editor.
Char * strcpy (char * strDest, const char * strSrc)
{
If (strDest = = NULL | | strSrc = = NULL)
Return 0
Char * address = strSrc
While (* strDest++ = * strSrc++)! ='\ 0')
NULL
Return addressl
}
/ / string comparison function, equality returns 0 quotient S1 returns positive integer, S2 returns negative integer
Int mystrcmp (const char * S1 Const char * S2)
{
While (* s _ 1 / s _ 1x _ r _ 0 _ r _ 2 _ r _ r
Return (* S1)-(* S2)
}
/ / string length function, excluding the'/ 0' at the end
Int mystrlen (const char * s)
{
Int res = 0
While (* slotted trees)
Res++
Return res
}
/ / string concatenation function
Char * mystrcat (char * source,const char * dest)
{
If (source = = NULL
| | dest = = NULL)
Return 0
Char * s = source
While (* sails after raceme) slots +
While (* destabilized automobile racer 0') * swarm + = * dest++
* slots, please beat 0'.
Return source
}
/ / string conversion lowercase letter function
Char * mystrlwr (char * source)
{
Char * s = source
Do
{
If (* s > = 'A'&&*s='a'&&*s
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.