Differences between revisions 21 and 44 (spanning 23 versions)
Revision 21 as of 2009-12-31 20:22:05
Size: 1007
Editor: KaiJaeger
Comment: New version
Revision 44 as of 2018-02-15 15:15:17
Size: 2947
Editor: KaiJaeger
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
## page was renamed from APLTeamsUtil
= APLTeamUtils =
{{{APLTeamUtils}}} is part of the CategoryAplApl project.
= APLTreeUtils =
{{{APLTreeUtils}}} is part of the CategoryAplTree project.
Line 5: Line 4:
Almost all classes created by APL Team Ltd (with the important exception of [[ADOC]]) :Include the namespace script APLTeamUtil. <<TableOfContents>>
Line 7: Line 6:
That means that before you can load successfully one of these classes, you must make sure that this namescript script is already in the current workspace. Many classes in the [[CategoryAplTree|APLTree]] project (with the notable exception of [[ADOC]] which is self-content) `:Include` the namespace script `APLTreeUtils`.
Line 9: Line 8:
Note that this script injects an Open-Source copyright notice into any class that :Includes it. That means that before you can load successfully one of these classes you must make sure that the namespace script `#.APLTreeUtils` is already in the current workspace. (If you use `ScriptManager` it will deal with that for you)
Line 11: Line 10:
== Repository ==
In the APL wiki code repository you can access the APLTeamUtils sub project with:
Note that all functions in `APLTreeUtils` are independent from `⎕IO` as well as `⎕ML`.

Although `APLTreeUtils` is designed to be included in classes there is nothing wrong with calling its functions from outside like this:
Line 15: Line 15:
svn list svn://aplteam.com/os/dyalog/APLTeamUtils       APLTreeUtils.FindPath
Line 17: Line 17:
||Original author: ||KaiJaeger ||
||Responsible: ||KaiJaeger ||
||Email: || kai@aplteam.com ||
||Current state: ||1.39 ||
Line 22: Line 18:
== List of functions ==
Line 23: Line 20:
[[http://aplteam.com/aplwiki/APLTeamUtilsDownloadPage?action=AttachFile&do=get&target=APLTeamUtils.ZIP|Download right now]] {{{
CreateUUID ⍝ Returns a UUID. See http://goo.gl/aa6V (Wikipedia) for details.
DropEmptyZerosAndBlanks ⍝ Drop empty vectors as well as all items consisting of either ' ' or 0 from ⍵.
Enlist ⍝ Flattens the right argument no matter what it is.
FindPathTo ⍝ Useful to find a certain script in the workspace.
First ⍝ Returns the first scalar of its right argument no matter what `⎕ML` is.
FormatDateTime ⍝ Formats one ⍺to many date.
GetOperatingSystem ⍝ Takes `⍬` as right argument and returns a three-item vector like "Win", "AIX", "Mac" or "Lin".
GoToWebPage ⍝ Fires up the default browser and displays the page specified as right argument.
IsChar ⍝ Returns a 1 if the right argument is of type Char.
IsDevelopment ⍝ Returns a 1 if executed in a Unicode version of Dyalog.
IsUnicode ⍝ Returns a 1 if executed in a Unicode version of Dyalog.
Last ⍝ Returns the extension from a full path. Separator ⍺ defaults to ".".
Lowercase ⍝ Enforces lowercase for strings as well as a vector of strings.
Mix ⍝ Performs a "Mix" operation no matter what `⎕ML` actually is.
Nest ⍝ Enclose if right argument is simple.
ReadBytesAs8BitSignedIntegersFromFile
ReadUtf8File ⍝ Return contents of a UTF8 file.
Split ⍝ Split string . Separator ⍺ defaults to CR+LF.
SplitPath ⍝ Part Path from filename+extension. Separator ⍺ defaults to "\".
Uppercase ⍝ Enforce uppercase for strings as well as a vector of strings.
Where ⍝ Returns indices for Boolean scalar or vector `⍵`.
WriteBytesAs8BitSignedIntegersToFile
WriteUtf8File ⍝ Creates or overwrites a UTF8 file without BOM.
dlb ⍝ Delete leading blanks.
dmb ⍝ Delete multiple blanks.
dtb ⍝ Delete trailing blanks.
}}}
Line 25: Line 49:
[[attachment:APLTeamUtils.ZIP|Manage the attachment]] <<Include(APLTreeDownloads)>>
Line 28: Line 52:
CategoryAplApl CategoryAplTree

APLTreeUtils

APLTreeUtils is part of the CategoryAplTree project.

Many classes in the APLTree project (with the notable exception of ADOC which is self-content) :Include the namespace script APLTreeUtils.

That means that before you can load successfully one of these classes you must make sure that the namespace script #.APLTreeUtils is already in the current workspace. (If you use ScriptManager it will deal with that for you)

Note that all functions in APLTreeUtils are independent from ⎕IO as well as ⎕ML.

Although APLTreeUtils is designed to be included in classes there is nothing wrong with calling its functions from outside like this:

      APLTreeUtils.FindPath

List of functions

CreateUUID              ⍝ Returns a UUID. See http://goo.gl/aa6V (Wikipedia) for details.
DropEmptyZerosAndBlanks ⍝ Drop empty vectors as well as all items consisting of either ' ' or 0 from ⍵.
Enlist                  ⍝ Flattens the right argument no matter what it is.
FindPathTo              ⍝ Useful to find a certain script in the workspace.
First                   ⍝ Returns the first scalar of its right argument no matter what `⎕ML` is.
FormatDateTime          ⍝ Formats one ⍺to many date.
GetOperatingSystem      ⍝ Takes `⍬` as right argument and returns a three-item vector like "Win", "AIX", "Mac" or "Lin".
GoToWebPage             ⍝ Fires up the default browser and displays the page specified as right argument.
IsChar                  ⍝ Returns a 1 if the right argument is of type Char.
IsDevelopment           ⍝ Returns a 1 if executed in a Unicode version of Dyalog.
IsUnicode               ⍝ Returns a 1 if executed in a Unicode version of Dyalog.
Last                    ⍝ Returns the extension from a full path. Separator ⍺ defaults to ".".
Lowercase               ⍝ Enforces lowercase for strings as well as a vector of strings.
Mix                     ⍝ Performs a "Mix" operation no matter what `⎕ML` actually is.
Nest                    ⍝ Enclose if right argument is simple.
ReadBytesAs8BitSignedIntegersFromFile
ReadUtf8File            ⍝ Return contents of a UTF8 file.
Split                   ⍝ Split string . Separator ⍺ defaults to CR+LF.
SplitPath               ⍝ Part Path from filename+extension. Separator ⍺ defaults to "\".
Uppercase               ⍝ Enforce uppercase for strings as well as a vector of strings.
Where                   ⍝ Returns indices for Boolean scalar or vector `⍵`.
WriteBytesAs8BitSignedIntegersToFile 
WriteUtf8File           ⍝ Creates or overwrites a UTF8 file without BOM.
dlb                     ⍝ Delete leading blanks.
dmb                     ⍝ Delete multiple blanks.
dtb                     ⍝ Delete trailing blanks.


CategoryAplTree

APLTreeUtils (last edited 2018-03-03 11:46:51 by KaiJaeger)