Add comment to a zone counting its spaces

Hi everyone,
I’m trying to do this: I’ve got lots of zones and lots of spaces associated, every space has got a name like “Chambre 1” “Chambre 2” “Sejour/Cuisine” …
I want to add a comment to the zone writing “T” and after the number of “Sejour/Cuisine” or “Chambre x” counted in the same zone.
The idea is to use an if condition to count “Sejour/Cuisine” space, “Chambre x” spaces but not counting the other spaces like “WC”, “SdB”…
The problem is that I can take all zones and also all spaces ma I don’t know how to obtain every zone separated from the others with its spaces separating from the others.
Can someone help me please?

Instead of using a filter by bool mask, use an if node.

  1. Test if the string equals “Sejour/Cuisine”. (==)
  2. If true, return 1; otherwise return 0. (If)
  3. Sum the sublists of 1’s and 0’s. (Math.Sum)
  4. Turn that into a string. (String.FromObject)
  5. Test if the string contains “Chambre”. (String.Contains)
  6. If true, return 1; otherwise return 0. (If)
  7. Sum the sublists of 1’s and 0’s. (Math.Sum)
  8. Turn that into a string. (String.FromObject)
  9. Add the prefix to the sums of Sejor/Cuisine strings. (+)
  10. Add the separator to the sums of Chambre strings as a prefix. (+)
  11. Add the prefixed Sejor/Cuisine strings to the prefixed Chambre strings. (+)
  12. Replace the .000000 parts of the string with an empty string. (String.Replace)