Ansichten: QuotePaste - CodePaste - NoPaste
Codesnippet eingetragen am 3.7.2012 um 19:18
Von: Mirrakor
Sprache: c++
Beschreibung: Code to group binary figures
CodeSnippet:
  1. QString tmp_display_string;
  2. int tmp_display_string_length = text_.length();
  3. for (int i = tmp_display_string_length; i > 0 ; i--){
  4. if(i % binaryGrouping_ == 0 && i != tmp_display_string_length){
  5. tmp_display_string = tmp_display_string + " ";
  6. }
  7. tmp_display_string = tmp_display_string + text_[tmp_display_string_length - i];
  8. }
  9. text_ = tmp_display_string;