code: private static int handleTashkeelWithTatweel(char[] dest, int sourceLength) {
                       int i;
                       for(i = 0; i < sourceLength; i++){
                           if((isTashkeelOnTatweelChar(dest[i]) == 1)){
                               dest[i] = TATWEEL_CHAR;
                          }else if((isTashkeelOnTatweelChar(dest[i]) == 2)){
                               dest[i] = SHADDA_TATWEEL_CHAR;
                          }else if((isIsolatedTashkeelChar(dest[i])==1) && dest[i] != SHADDA_CHAR){
                               dest[i] = SPACE_CHAR;
                          }
                       }
                       return sourceLength;
      }
docs: /*
  Name     : handleTashkeelWithTatweel
  Function : Replaces Tashkeel as following:
  Case 1 :if the Tashkeel on tatweel, replace it with Tatweel.
  Case 2 :if the Tashkeel aggregated with Shadda on Tatweel, replace
  it with Shadda on Tatweel.
  Case 3: if the Tashkeel is isolated replace it with Space.