AnsweredAssumed Answered

Finding mid-paragraph space " " position

Question asked by ryyno10 on Apr 9, 2014
Latest reply on Apr 10, 2014 by ryyno10

Title

Finding mid-paragraph space " " position

Post

     hello,

     I'm stuck trying to find a way to find the precise position of the median space in a paragraph so I can substitute a carriage return.  I used the following let function:

     My vars:

     $$mpl_body = paragraph texted depending upon list position as indicated by $i

      

     Let (
     [
     paraghString = Trim ( GetValue ( $$mpl_body ; $i ) );
     $breakSpacePositionLast = Position ( paraghString ; " " ; Length ( paraghString ) ; -1 );
     $breakSpacePositionMiddle = ?
     ];
     Replace ( paraghString ; $breakSpacePositionMiddle; 0 ; "¶" )
     )

      

      

     I'm using $breakSpacePositionLast to find the last space; i though this could be used in some manner to find the space closest to the middle of the paragraph. 

     Can anyone provide some direction?

Outcomes