<commit_before>#include "prototype.h"

void trimStr(std::string& x){
 bool isNeg = ((int)x.length() > 0) && x[0] == '-';
 if(isNeg) 
   x = x.substr(1);
 while((int)x.length() > 0 && x[0] == '0') 
  x = x.substr(1);
 if(isNeg && x!= "0")
   x = '-' + x;
}
void sign(std::string& x){
 
}

void placeHandler(std::string& x, std::string& y){
 trimStr(x);
 trimStr(y);
 bool x_isNeg = ((int)x.length() > 0) && x[0] == '-';
 bool y_isNeg = ((int)y.length() > 0) && y[0] == '-';
 if(x_isNeg)
  x = x.substr(1);
 if(y_isNeg)
  y = y.substr(1);
 while(cmprLen(x,y) != 0){
  if(cmprLen(x,y) < 1){
   x = "0" + x;
  }
  else{
   y = "0" + y;
  }
}
<commit_msg>Update algorithm-string.h<commit_after>#include "prototype.h"

void trimStr(std::string& x){
 bool neg = isNeg(x);
 if(neg) 
   sign(x);
 else
   trimAbsStr(x);
 if(neg && x!= "0")
   x = '-' + x;
}

void trimAbsStr(std::string& x){
 while((int)x.length() > 0 && x[0] == '0') 
  x = x.substr(1);
}
void sign(std::string& x){
 if(isNeg(x)){
  x = x.substr(1);
  trimAbsStr();
 }
 else{
  trimAbsStr();
  x = "-" + x;
 }
 
}

void placeHandler(std::string& x, std::string& y){
 trimStr(x);
 trimStr(y);
 bool x_isNeg = ((int)x.length() > 0) && x[0] == '-';
 bool y_isNeg = ((int)y.length() > 0) && y[0] == '-';
 if(x_isNeg)
  x = x.substr(1);
 if(y_isNeg)
  y = y.substr(1);
 while(cmprLen(x,y) != 0){
  if(cmprLen(x,y) < 1){
   x = "0" + x;
  }
  else{
   y = "0" + y;
  }
}

{'fraction_non_alphanumeric': 0.2654494382022472, 'fraction_numerical': 0.023876404494382022, 'mean_word_length': 3.1911764705882355, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1182148', 'n_tokens_mistral': 692, 'n_tokens_neox': 674, 'n_words': 133}