Home modules.gotpike.org
Username: Password: [Create Account]
[Forgot Password?]

Modules

ADT
Database
GTK2
GUI
IP
PiJAX
Public
Sql
Stdio
Subversion
System
Tools
Xosd
lua
v4l2
wx

Recent Changes

Public.Parser.XML2 1.50
Public.ZeroMQ 1.1
Public.Template.Mustache 1.0
Public.Protocols.XMPP 1.4
Sql.Provider.jdbc 1.0

Popular Downloads

Public.Parser.JSON2 1.0
Public.Parser.JSON 0.2
GTK2 2.23
Public.Web.FCGI 1.8
Public.Parser.XML2 1.48


Pike Module Reference:

module version 0.1, prepared

  MODULE Public
Modules
Standards

  MODULE Public.Standards
Modules
CSV

  MODULE Public.Standards.CSV
Methods
dequote()
detect_type()
enquote()

Method enquote

string Public.Standards.CSV.enquote(string in)

Description

Enquote data to be put into a CSV file This means doubling the quoting character: " -> ""

Parameter in

The string to quote Example: John "foo" Doe

Returns

The quoted string, ready to be written in a CSV file Example: John ""foo"" Doe


Method dequote

string Public.Standards.CSV.dequote(string in)

Description

Dequote data taken from a CSV file This means reducing double quoting character: "" -> "

Parameter in

The string to dequote Example: John ""foo"" Doe

Returns

The string unquoted, ready to be processed Example: John "foo" Doe


Method detect_type

mixed Public.Standards.CSV.detect_type(mixed v)

Description

Determines the "human" type of a string.

In CSV, data are stored as strings, but the actual value can be of any type.

Example: "42" -> 42 "3.14" -> 3.14

Parameter v

The data we want to determine type

Returns

The actual value, casted as the determined type.

gotpike.org | Copyright © 2004 - 2019 | Pike is a trademark of Department of Computer and Information Science, Linköping University