hi, I am writing long strings into text file via fprintf. instead of having long lines, I want to break these lines into shorter lines of strings.

for example: I have :""CountyName: Greenbrier The rooms were very nice and clean adn roomy, but the heat/AC was messed up and the food wasn't very good. Also, the juice machine, milk, and pop machine was almost always either watery or not working at all. The stay at West Virginia university was very nice there were very nice ""
I would like County name to appear at lef side of the text and then the remaining of text in a block at right hand side of the text.

1 comentario

Your question is a bit unclear on what the output should be. Maybe show the exact format of the desired output.
More importantly, you haven't stated the criteria for determining the end of the country name. Is it always one word (what about New Zealand then?)? Have you got a dictionary of country names? Is the program supposed to do semantic parsing to know where to split?

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Characters and Strings en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 17 de Sept. de 2015

Comentada:

el 17 de Sept. de 2015

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by