From: Thierry Parmentelat Date: Thu, 17 Mar 2011 16:01:31 +0000 (+0100) Subject: helper fun to inspect strings X-Git-Tag: plewww-4.3-62~8 X-Git-Url: http://git.onelab.eu/?p=plewww.git;a=commitdiff_plain;h=d143bfb2c9741d8f82c78ec97472c7648a750eed helper fun to inspect strings --- diff --git a/planetlab/includes/plc_functions.php b/planetlab/includes/plc_functions.php index 43a384d..a51bf59 100644 --- a/planetlab/includes/plc_functions.php +++ b/planetlab/includes/plc_functions.php @@ -431,6 +431,16 @@ function plc_debug ($message,$object) { print ""; } +function plc_debug_txt ($message,$txt) { + print "
" . $message . "
";
+  $txt=str_replace(" ","<SPC>",$txt);
+  $txt=str_replace("\t","<TAB>",$txt);
+  $txt=str_replace("\n","<LF>",$txt);
+  $txt=str_replace("\r","<CR>",$txt);
+  print $txt . "<EOF>";
+  print "
"; +} + $plc_prof_start=0.; $plc_prof_time=0.; $plc_prof_counter=0;