题目:请实现字符串右循环移位函数,比如:“abcdefghi”循环右移2位就是“hiabcdefg”.
函数原型:void RightLoopMove(char *pStr, unsigned short steps)
函数参数说明:
pStr: Point to a ‘\0’ terminated string
steps: The rotate shift numbers
方法一:移位法
#include<stdio.h>
#include<assert.h>
#include<string.h>
void RightLoopMove(char*pStr,unsigned short steps)
{
int len=0;
char tmp=0;
int i=0;