Suppose there is a text:

String s = "Pater noster, qui es in caelis; sanctificetur nomen tuum; adveniat regnum tuum; fiat { voluntas tua, sicut in caelo et in terra. Panem nostrum quotidianum da nobis hodie; et dimitte nobis debita nostra, sicut et nos dimittimus debitoribus nostris } ; et ne nos inducas { in tentationem; sed libera nos } a malo. Amen" 

It is necessary to “enter” it after the symbol { , replace all in with el if they exist and “exit” if the } character is encountered and continue further in the text with the same condition.

  • What are your difficulties? - Alexey Shimansky
  • one
    Try to break into an array of strings - a kind of phrase. Every time you meet fiat, you go in and replace, when you meet the phrase nostra, you stop. For example, when the Morse translator wrote - used this approach. It is logically convenient to write more clearly than in the indexes and charms to swarm. - Silento
  • @Asgard your approach interested me, and can be more? What does it mean to break into an array of strings? - Jürgen von Markoff

0