function fp_reduce_whitespace

7.x misc.inc fp_reduce_whitespace($str)
6.x misc.inc fp_reduce_whitespace($str)
5.x misc.inc fp_reduce_whitespace($str)

Simple helper function to reduce whitespace (like double-spaces)

Parameters

string $str:

11 calls to fp_reduce_whitespace()
advise.history.inc in modules/advise/advise.history.inc
advise_popup_display_summary in modules/advise/advise.history.inc
Displays the printable advising summary.
AdvisingScreen.php in classes/AdvisingScreen.php
AdvisingScreen::display_popup_substitute in classes/AdvisingScreen.php
This is used to display the substitution popup to a user, to let them actually make a substitution.
fp_get_js_alert_link in includes/misc.inc
Creates a javascript "alert" link, which tells the user some message with javascript alert().

... See full list

File

includes/misc.inc, line 3163
This file contains misc functions for FlightPath

Code

function fp_reduce_whitespace($str) {
  // Cheap hack to get rid of whitespace
  for ($t = 0; $t < 5; $t++) {
    $str = str_replace("  ", " ", $str);
    $str = str_replace("\n ", "\n", $str);
  }



  return $str;
}