× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Peter,

Substring with a length of 20 and then CHECKR for the characters not to wrap on.

Regards,
Carel Teijgeler

On 1-5-2013 16:18, Vidal, Peter wrote:
Hello Team!

I would like to have your feedback on this thought / challenge:

I have a description field (let's call it "LongField") which is 64 characters long. I need to print this field but I have only a limited space of 20 characters. I would like to split the field in such a way that I can have it printed in this pre-printed form / column. For example:

/=========================/
LongField = "MAN BASIC W/ BUILT IN OSTOMY SUPPORT/BARRIER, MODULAR SYSTEM"

Required Printed Output:
MAN BASIC W/ BUILT
IN OSTOMY
SUPPORT/BARRIER,
MODULAR SYSTEM
/=========================/

I would probably need four fields (20/A) to allow the entire description to print the way I am suggesting here. Oh well, I believe I have seen this code being suggested before but I can't find it. As you can see, the portion of the string "SUPPORT/BARRIER," was not splitted because there are no spaces in between the words and the slash so I know the routine I saw before has logic to determine the most appropriate place to "cut" the string based on the fact if there is enough room space to fit or not. In this case, cannot be greater than 20 characters, as I stated before.

Any suggestions / advices are really appreciated.

Best regards,
Peter Vidal

________________________________
This communication is intended only for the use of the individual or entity named as the addressee. It may contain information which is privileged and/or confidential under applicable law. If you are not the intended recipient or such recipient's employee or agent, you are hereby notified that any dissemination, copy or disclosure of this communication is strictly prohibited. If you have received this communication in error, please immediately notify CareCentrix Compliance Hot Line at (877) 848-8229 and notify the sender by electronic mail. Please expunge this communication without making any copies. Thank you for your cooperation.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.