Macaulay2 » Documentation
Packages » Macaulay2Doc » The Macaulay2 language » strings and nets » String
next | previous | forward | backward | up | index | toc

String -- the class of all strings

Description

A string is thing that contains a sequence of characters (bytes). A string is normally entered as a sequence of characters surrounded by quotation marks.

i1 : "abcd"

o1 = abcd

Strings involving special characters can be entered by using the backslash as an escape character, see ". For an alternate method of entering strings with fewer escape sequences, see ///.

A net is a two-dimensional array of characters, and strings are regarded as a type of net.

Menu

Functions and methods returning a string:

  • ascii(BasicList) -- see ascii -- ASCII character conversion
  • ascii(ZZ) -- see ascii -- ASCII character conversion
  • changeBase(String,ZZ,ZZ) -- see changeBase -- change integer base
  • changeBase(ZZ,ZZ) -- see changeBase -- change integer base
  • concatenate(BasicList) -- see concatenate -- join strings
  • concatenate(Nothing) -- see concatenate -- join strings
  • concatenate(String) -- see concatenate -- join strings
  • concatenate(Symbol) -- see concatenate -- join strings
  • concatenate(ZZ) -- see concatenate -- join strings
  • disassemble(FunctionBody) -- see disassemble -- disassemble a pseudocode or function
  • disassemble(FunctionClosure) -- see disassemble -- disassemble a pseudocode or function
  • disassemble(Pseudocode) -- see disassemble -- disassemble a pseudocode or function
  • disassemble(PseudocodeClosure) -- see disassemble -- disassemble a pseudocode or function
  • format -- format a string or real number
  • format(CC) -- see format -- format a string or real number
  • format(RR) -- see format -- format a string or real number
  • format(String) -- see format -- format a string or real number
  • get(File) -- see get -- get the contents of a file
  • get(String) -- see get -- get the contents of a file
  • getc(File) -- see getc -- get a byte
  • getenv(String) -- see getenv -- get value of environment variable
  • html -- convert to HTML format
  • info -- convert hypertext to info format
  • Database # String -- see List # ZZ -- get value from list, hash table, database, dictionary, or string
  • Net # ZZ -- see List # ZZ -- get value from list, hash table, database, dictionary, or string
  • String # ZZ -- see List # ZZ -- get value from list, hash table, database, dictionary, or string
  • mathML -- convert to MathML format
  • String | String -- see Net | Net -- join strings or nets
  • String | ZZ -- see Net | Net -- join strings or nets
  • ZZ | String -- see Net | Net -- join strings or nets
  • pad(String,ZZ) -- see pad -- pad a string or net with spaces
  • pad(ZZ,String) -- see pad -- pad a string or net with spaces
  • read(File) -- read from a file
  • read(File,ZZ) -- read from a file
  • read(Sequence) -- read from a file
  • read(String) -- read from a file
  • regexQuote -- escape special characters in regular expressions
  • replace(String,String,String) -- replace substrings matching a regular expression
  • reverse(String) -- see reverse -- reverse a list, sequence, or string
  • String _ Sequence -- substring
  • String _ ZZ -- get element from string
  • substring(Sequence,String) -- see substring -- extract part of a string
  • substring(String,ZZ) -- see substring -- extract part of a string
  • substring(String,ZZ,ZZ) -- see substring -- extract part of a string
  • substring(ZZ,String) -- see substring -- extract part of a string
  • substring(ZZ,ZZ,String) -- see substring -- extract part of a string
  • tex -- convert to $\TeX$ format
  • texMath -- convert to TeX math format
  • toExternalString -- convert to a readable string
  • toString -- convert to a string

Methods that use a string:

  • # String -- see # List -- length or cardinality of a list, hash table, dictionary, set, or string
  • Database #? String -- see #? -- check existence of value in a list, hash table, database, or string
  • Dictionary #? String -- see #? -- check existence of value in a list, hash table, database, or string
  • String #? ZZ -- see #? -- check existence of value in a list, hash table, database, or string
  • about(String) -- see about -- search the documentation
  • apply(BasicList,String,Function) -- see apply(BasicList,BasicList,Function) -- apply a function to pairs of elements, one from each list
  • apply(String,BasicList,Function) -- see apply(BasicList,BasicList,Function) -- apply a function to pairs of elements, one from each list
  • apply(String,String,Function) -- see apply(BasicList,BasicList,Function) -- apply a function to pairs of elements, one from each list
  • apply(String,Function) -- see apply(BasicList,Function) -- apply a function to each element of a list
  • apropos(String) -- see apropos -- symbols matching a pattern
  • ascii(String) -- see ascii -- ASCII character conversion
  • autoload(Symbol,String) -- see autoload -- arrange for a function to be loaded automatically
  • capture(String) -- see capture -- evaluate Macaulay2 code and capture the output
  • changeBase(String,ZZ) -- see changeBase -- change integer base
  • check(List,String) -- see check -- perform tests of a package
  • check(String) -- see check -- perform tests of a package
  • check(ZZ,String) -- see check -- perform tests of a package
  • copyDirectory(String,String)
  • copyFile(String,String)
  • debug(String) -- open the local dictionary of a loaded file
  • depth(String) -- see depth(Net) -- depth of a net
  • dismiss(String) -- see dismiss -- dismiss a package
  • makeDocumentTag(String) -- see DocumentTag -- the class of all document tags
  • endPackage(String) -- see endPackage -- end a new package
  • EXAMPLE(String) -- see EXAMPLE -- construct a hypertext item from a Macaulay2 input string
  • export(String) -- see export -- export symbols from a package
  • exportFrom(Package,String) -- see exportFrom -- export symbols from a package's private dictionary
  • exportFrom(String,List) -- see exportFrom -- export symbols from a package's private dictionary
  • exportFrom(String,String) -- see exportFrom -- export symbols from a package's private dictionary
  • exportMutable(String) -- see exportMutable -- export mutable symbols from a package
  • fileExecutable(String) -- see fileExecutable
  • fileMode(String) -- get file mode
  • fileMode(ZZ,String) -- set file mode
  • fileReadable(String) -- see fileReadable
  • fileWritable(String) -- see fileWritable
  • findFiles(String) -- see findFiles -- find files recursively
  • findProgram(String) -- see findProgram -- load external program
  • findProgram(String,List) -- see findProgram -- load external program
  • findProgram(String,String) -- see findProgram -- load external program
  • generateAssertions(String) -- see generateAssertions -- generate assert statements from experimental input
  • String _ Monoid -- see get a ring variable by name -- get a ring variable by name
  • String _ Ring -- see get a ring variable by name -- get a ring variable by name
  • getWWW(String) -- see getWWW -- get a web page
  • getWWW(String,Nothing) -- see getWWW -- get a web page
  • getWWW(String,String) -- see getWWW -- get a web page
  • height(String) -- see height(Net) -- height of a net
  • help(String) -- see help -- view documentation nodes
  • httpHeaders(String) -- prepend http headers to a string
  • ideal(String) (missing documentation)
  • importFrom(Package,String) -- see importFrom -- import symbols to the current private dictionary
  • importFrom(String,List) -- see importFrom -- import symbols to the current private dictionary
  • importFrom(String,String) -- see importFrom -- import symbols to the current private dictionary
  • info(String) -- see info -- convert hypertext to info format
  • installPackage(String) -- see installPackage -- load and install a package and its documentation
  • iterator(String) -- see iterator -- get an iterator
  • length(String) -- length of a string
  • lines(String) -- see lines -- split a string into lines
  • lines(String,String) -- see lines -- split a string into lines
  • linkFile(String,String) -- make a new link to a file
  • Dictionary # String -- see List # ZZ -- get value from list, hash table, database, dictionary, or string
  • loadPackage(String) -- see loadPackage -- load a package
  • makeDirectory(String) -- make a directory
  • match(List,String) -- see match -- regular expression matching
  • match(String,String) -- see match -- regular expression matching
  • matrix(String) (missing documentation)
  • monomialIdeal(String) (missing documentation)
  • moveFile(String) -- see moveFile(String,String)
  • moveFile(String,String)
  • needsPackage(String) -- see needsPackage -- load a package if not already loaded
  • String ^ ZZ -- see Net ^ ZZ -- raise a net or string
  • net(String) -- convert a string to a net
  • NetFile << String -- see NetFile -- the class of all net files
  • newPackage(String) -- see newPackage -- the preamble of a package
  • openDatabase(String) -- see openDatabase -- open a database file
  • openDatabaseOut(String) -- see openDatabaseOut -- open a database file for writing
  • openIn(String) -- open an input file
  • openInOut(String) -- see openInOut -- open an input output file
  • openListener(String) -- open a port for listening
  • openOut(String) -- open an output file
  • openOutAppend(String) -- open an output file for appending
  • pack(String,ZZ) -- see pack -- pack elements of a list or string into several shorter lists or strings
  • pack(ZZ,String) -- see pack -- pack elements of a list or string into several shorter lists or strings
  • package(String) -- see package -- get containing package
  • File << String -- see printing to a file -- print to a file
  • String << Thing -- see printing to a file -- print to a file
  • readPackage(String) -- see readPackage -- read the package preamble
  • regex(String,String) -- see regex -- evaluate a regular expression search
  • regex(String,ZZ,String) -- see regex -- evaluate a regular expression search
  • regex(String,ZZ,ZZ,String) -- see regex -- evaluate a regular expression search
  • regexQuote(String) -- see regexQuote -- escape special characters in regular expressions
  • registerFinalizer(Thing,String) (missing documentation)
  • remove(Database,String) -- see remove -- remove an entry from a mutable hash table, list, or database
  • runProgram(Program,String) -- see runProgram -- run an external program
  • runProgram(Program,String,String) -- see runProgram -- run an external program
  • runProgram(String,String) -- see runProgram -- run an external program
  • scanLines(Function,String) -- see scanLines -- apply a function to each line of a file
  • searchPath(List,String) -- search a path for a file
  • searchPath(String) -- see searchPath(List,String) -- search a path for a file
  • select(String,String) -- see select(String,String,String) -- select and reformat substrings matching a regular expression
  • select(String,String,String) -- select and reformat substrings matching a regular expression
  • separate(String) -- see separate -- split a string into substrings using a regular expression
  • separate(String,String) -- see separate -- split a string into substrings using a regular expression
  • separate(String,ZZ,String) -- see separate -- split a string into substrings using a regular expression
  • setRandomSeed(String) -- see setRandomSeed -- set starting point for random number generator
  • splitWWW(String) -- see splitWWW -- separate an http response into header and body
  • String .. String -- a sequence of consecutive strings
  • String ..< String -- a sequence of consecutive strings, not including the endpoint
  • String ^ Sequence -- vertically stacked copies of a string
  • symlinkDirectory(String,String) -- make symbolic links for all files in a directory tree
  • tally(String) -- see tally -- tally the elements of a list, sequence, array, or string
  • tests(String) -- see tests -- locate a package's tests
  • tests(ZZ,String) -- see tests -- locate a package's tests
  • toList(String) -- see toList -- create a list
  • toSequence(String) -- see toSequence -- convert to sequence
  • uninstallPackage(String) -- see uninstallPackage -- uninstall a package and remove its documentation
  • unstack(String) -- see unstack -- list the rows of a net
  • new URL from String -- see URL -- a type representing a URL
  • urlEncode(String) -- see urlEncode -- URL encoding
  • value(String) -- evaluate a string
  • viewHelp(String) -- see viewHelp -- view online documentation in a web browser
  • Command \ String -- see VisibleList / Function -- apply a function to elements of a list
  • Function \ String -- see VisibleList / Function -- apply a function to elements of a list
  • String / Command -- see VisibleList / Function -- apply a function to elements of a list
  • String / Function -- see VisibleList / Function -- apply a function to elements of a list
  • width(String) -- see width(Net) -- width of a net

For the programmer

The object String is a type, with ancestor classes Net < Thing.


The source of this document is in Macaulay2Doc/ov_strings.m2:156:0.