Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string convertRehtml(string str){
- int len = str.length();
- int flag =0;
- string temp_str;
- string finalStr = "";
- int i = 0;
- cout << "in" ;
- while(i+1 < len){
- if(str[i]=='[' && str[i+1]=='<'){
- i++;
- while(str[i]!='>' && str[i+1]!=']'){
- finalStr += str[i];
- i++;
- }
- finalStr += str[i];
- i++;
- }
- else if(str[i]=='[' && str[i+1]=='{'){
- i+=2;
- while(str[i]!='}' && str[i+1]!=']'){
- temp_str = "";
- flag = 0;
- if(str[i]=='<'){
- finalStr += str[i+1];
- i++;
- while(str[i]!=' ' && flag == 0){
- if(str[i]== ' '){
- flag = 1;
- break;
- }
- temp_str += str[i];
- finalStr += str[i];
- i++;
- }
- cout << temp_str;
- if(isInlineTags(temp_str)){
- rehtmlTagStack.push(temp_str);
- }
- }
- }
- }
- else if(str[i]=='\n'){
- finalStr += str[i];
- finalStr += " ENTER HOYA JI ";
- i++;
- }
- else{
- finalStr += str[i];
- i++;
- }
- }
- return finalStr;
- }
Add Comment
Please, Sign In to add comment