Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results for string
Search options not deleted inquestion 2447
5 votes

Default for Code Golf: Input/Output methods

program may print: 42 i. e. the program is effectively doing a writeLn(output, 42:11) The :11 indicates the minimum number of characters the argument occupies (for numeric arguments, for char, string
Kai Burghardt's user avatar
11 votes

Default for Code Golf: Input/Output methods

Numerical input and output can be given as a string of digits and vice-versa As long as the input/output format is consistent, you may take a numerical output such as f(123) as a string f("123") and vice-versa … You may not add leading zeroes if you are using string input instead of a number. …
Jo King's user avatar
  • 47.5k
33 votes

Default for Code Golf: Input/Output methods

Submissions may use list of strings instead of multi-line strings Input or output may be the equivalent of the string separated by newlines. … For example, the multiline string: 1 2 Fizz 4 Buzz May be instead be taken as a list of strings like: ["1","2","Fizz","4","Buzz"] …
Jo King's user avatar
  • 47.5k
55 votes

Default for Code Golf: Input/Output methods

Programs may combine two or more input methods For example, if the inputs are a string and an int, a function that takes a string as an argument and an int from STDIN would be valid. …
8 votes

Default for Code Golf: Input/Output methods

If a program is supposed to take a whole number as input, it may accept the number as a unary string. …
Sophie Swett's user avatar
29 votes

Default for Code Golf: Input/Output methods

specified memory location If there are no I/O devices available, an answer might consist of a subroutine that reads its input values from some specified memory location (e.g. read a zero-terminated string
lynn's user avatar
  • 69.2k
17 votes

Default for Code Golf: Input/Output methods

For example, let's say you can assume the string input will match ^[1457]+$, which is a subset of ^[0-9]*$. Then, '1775' can also be input as [1, 7, 7, 5]. … However, for a counterexample, let's assume the string input will match ^[a0-8]{2,15}$, which isn't a subset of ^[0-9]*$. …
Erik the Outgolfer's user avatar
16 votes

Default for Code Golf: Input/Output methods

Answers may in some cases prefer using string tools on arrays, as long as the array will never have values over 255 taking input as a string then using functions like .replace() and .split() would be valid …
6 votes

Default for Code Golf: Input/Output methods

/tmp/bar NB: This rule is not applicable if the executable file name has to be a certain string to fulfill the programming challenge’s specifications at hand. …
-4 votes

Default for Code Golf: Input/Output methods

To overcome this, answers may accept such information as additional input in a minimally processed format (eg: unix timestamp instead of a date string, a single random value instead of a random generator …
Οurous's user avatar
  • 8,127
9 votes

Default for Code Golf: Input/Output methods

A natural number may be represented as a collection of n empty collections, and a string as a collection of such numbers In languages that do not have numbers or strings but do have lists, stacks, or other …
user's user avatar
  • 387
40 votes

Default for Code Golf: Input/Output methods

To be clear, this is how the process works with Ans: Within a program, type the input (number, list, string, etc.), followed by a newline to separate statements, followed by the program name, then press …
NinjaBearMonkey's user avatar
14 votes

Default for Code Golf: Input/Output methods

For example, say there is a language where output is stored in an output string variable, and automatically displayed when the program finishes execution. …
noodle person's user avatar
27 votes

Default for Code Golf: Input/Output methods

Full programs may take array/string input (of unknown length) via stdin in the form of <length> <contents> or <contents> <sentinel> EOF handling is a common problem in many languages, not just esolangs …
Bubbler's user avatar
  • 78.4k