title: Expression is not assignable on strlen(string)
body: <p>I keep getting this error when trying to cut out all repeating characters:</p>
  <pre><code>solution.c:16:26: error: expression is not assignable
          (int)strlen(str1)--; 
               ~~~~~~~~~~~~^ 
  </code></pre>
  <p>I am trying to do a program to check if a given string of scrambled characters could be rearranged into a given word. Link to Codewars Kata: <a href="https://www.codewars.com/kata/55c04b4cc56a697bb0000048/train/c" rel="nofollow noreferrer">https://www.codewars.com/kata/55c04b4cc56a697bb0000048/train/c</a>.</p>
  <p>My full code:</p>
  <pre><code>#include &lt;stdbool.h&gt;
  #include &lt;string.h&gt;
  #include &lt;stdio.h&gt;
  
  bool scramble(char *str1, char *str2)
  {
    /* solution here */
    bool indicator = false;
    for(int i=0; i&lt;(int)strlen(str1); i++){
      char ch = str1[i];
      for(int j=i+1; j&lt;(int)strlen(str1); ){      
        if(str1[i] == str1[j]){
          for(int k=j; k&lt;(int)strlen(str1); k++){
            str1[k] = str1[k+1];
          }
          (int)strlen(str1)--; 
        } else {
            j++;
        }
      } 
    }
    
    for (int i = 0; i &lt; (int)strlen(str2); i++) {
      for (int j = 0; j &lt; (int)strlen(str1); j++) {
        if (str1[j] == str2[i]) {
          indicator = true;
        }
      }
      if (indicator == true) {
        continue;
      } else {
        return false;
      }
    }
    //printf(&quot;%d\n&quot;, indicator);
    if (indicator == true) {
      return true;
    } else {
      return false;
    }
  }
  </code></pre>
  <p>In order for me to complete this problem I have to shorten the string and remove all repeating characters from the scrambled string. How can I solve this issue, or if I can't at all, then how can I shorten the string after a char removal?</p>