4.0

4.0 | 2 ratings Rate this file 8 Downloads (last 30 days) File Size: 2.92 KB File ID: #10536
image thumbnail

detab: a pedestrian string detabulator

by us

 

27 Mar 2006 (Updated 28 Mar 2006)

replaces TAB characters with the appropriate number of SPACE characters

| Watch this File

File Information
Description

DETAB replaces TAB characters with the appropriate number of SPACE characters from the contents of a file or a cell array (containing strings) such that the absolute position of text entries is preserved.

This is particularly useful for populating UICONTROLs (eg, listboxes) with the contents of files or strings that contain TABs

see
> help detab
for explanations and the accompanying image for an example

Acknowledgements
This submission has inspired the following:
fdep: a pedestrian function dependencies finder
MATLAB release MATLAB 7.2 (R2006a)
Other requirements good spirits!
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
03 Oct 2007 Fred Sieling

Excellent for simple strings. I haven't tried anything more.

02 Jul 2008 Alexi Nedo

One Interesting Point:

Search for the tab (\t) character in a string.
1- findstr (str, '\t') --> does NOT Work

2- tab = sprintf('\t');
   findstr(str, s) --> Works

Please login to add a comment or rating.
Updates
28 Mar 2006

removed a small typo; version tag 28-Mar-2006 16:25:00

Tag Activity for this File
Tag Applied By Date/Time
strings us 22 Oct 2008 08:20:30
string us 22 Oct 2008 08:20:30
tab us 22 Oct 2008 08:20:30
character us 22 Oct 2008 08:20:30
strfind us 22 Oct 2008 08:20:30
strrep us 22 Oct 2008 08:20:30
regular expression us 22 Oct 2008 08:20:30

Contact us at files@mathworks.com