I am getting a string like the following bench from the database:
's object is to do the following: * Blah 1 * blah 2 * blah 3 * blah 4. Some other extremely bad lessons yet another sentence that is full of very conservative text. Thankfully this is the last sentence.
I need to format it so that each *
represents a bullet point, and the last sentence after the last *
goes to the new line , Ideally is as follows:
The purpose of the following is to: * blah 1 * blah 2 * blah 3 * blah 4. Some other very bad lessons. Yet another sentence that is full of highly conservative texts. Thankfully this is the last sentence.
isolating the string from the *
character and & lt; Br / & gt; *
. I am using the following for:
string description = GetDescription (); Description = Details. Place ("*", "
But the result gives me:
The purpose of the following is: * blah 1 * blah 2 * blah 3 * Blah 4. Some other extremely bad lessons yet another sentence that is full of highly conservative lessons. Thankfully this is the last sentence.
After the last '*' there is some difficulty in identifying the punishment of the fist, so I can put a break there too Can anyone show me how to do this?
If it can be assumed that the first sentence is the last '*' after the Is separated from a period - then you can do the following:
- Replace input by searching for all
*
characters - Last
& lt; Br> Get
and then the first. Find
. - Re-combine pieces, with
*
with& lt; Br / & gt; *
Here you are given some code: (this will not be correct). I am using string.plit ()
instead of string.Replace ()
, because I think this logic makes logic easy. The move is that in the last sub-radians, two parts (bullet and bullet-post-sentence) are included.
string input text = "..."; String [] sub-rule = input text ("*"); // Split last field bullet and sentance on the first period ... string [] lastRegions = subRegions [subRegion.Length-1]. Explicit (new [] {'.'}, 2); // joint parts (bullet / sentence) sub-provisions [sermons. Lanti-1] = Junk instead of the last sub-region with the string. (".,"; Last rule); // All subregions combine together, `` `has been replaced with the bullet paused. String final text = string .joined ("
Comments
Post a Comment