diff src/constants.h @ 55:aaaf8cdbc85c

Make percent string formatting more flexible It now also responds to .94 or something like that and is prepared for multiple numbers after the dot.
author Andre Heinecke <andre.heinecke@intevation.de>
date Wed, 20 Jul 2016 16:57:52 +0200
parents a43d8cf2fa95
children 5410f9f279ea
line wrap: on
line diff
--- a/src/constants.h	Wed Jul 20 16:56:54 2016 +0200
+++ b/src/constants.h	Wed Jul 20 16:57:52 2016 +0200
@@ -63,7 +63,7 @@
 
 /**
  * @brief The pattern used to match a multiple choice answer. */
-#define CHOICE_PATTERN "\"(.*)\",(?<num>\\d+)?,(?<percent>\\d+\\.?\\d+)?"
+#define CHOICE_PATTERN "\"(.*)\",(?<num>\\d+)?,(?<percent>\\d{0,3}\\.{0,1}\\d*)?"
 
 /**
  * @brief The pattern used to match an unfilled choice answer. */
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)