C# (Reference) Java Swift PHP Perl Kotlin Python Ruby JavaScript Delphi Freepascal F# Go
Dictionary<string, object> Map<String, Object> [String: Any] array (assoc with mixed values) %%hash mutableMapOf<String, Any?>() dict[str, Any] Hash<String, Object> Object / Map TDictionary<string, TObject> TFPHashObjectList / TFPDataHashTable Map<string, obj> map[string]interface{}
List List [String] array @array mutableListOf() list[str] Array Array TList TStringList List []string
HashSet Set Set array_unique or associative array as set %%hash as set mutableSetOf() set[str] Set (require ‘set’) Set THashSet or TDictionary<string, Boolean> TFPHashObjectList as set Set map[string]bool
File.ReadAllLines Files.readAllLines(Paths.get(“file”)) try String(contentsOfFile:).components(separatedBy: .newlines) file(‘file.txt’) open + + @lines = ; File(“file”).readLines() open(‘file’).read().splitlines() File.readlines(‘file’) fs.readFileSync(‘file’, ‘utf8’).split(‘’) TStringList.LoadFromFile TStringList.LoadFromFile System.IO.File.ReadAllLines ioutil.ReadFile + strings.Split(string(data), “”)
File.ReadAllText Files.readString(Paths.get(“file”)) try String(contentsOfFile:) file_get_contents(‘file.txt’) open + join(’’, ) File(“file”).readText() open(‘file’).read() File.read(‘file’) fs.readFileSync(‘file’, ‘utf8’) TStringList.LoadFromFile then Text property TStringList.LoadFromFile then Text property System.IO.File.ReadAllText ioutil.ReadFile