hhzl / cuis-neocsv Goto Github PK
View Code? Open in Web Editor NEWRead and write CSV converting to or from Cuis-Smalltalk objects. Port from http://www.smalltalkhub.com/#!/~SvenVanCaekenberghe/Neo
License: MIT License
Read and write CSV converting to or from Cuis-Smalltalk objects. Port from http://www.smalltalkhub.com/#!/~SvenVanCaekenberghe/Neo
License: MIT License
Reasons
Pharo
Character
isCharacter
^ true.
Pharo
join: aCollection
"'*' join: #('WWWWW' 'W EW' 'zzzz')
-> 'WWWWW*W EW*zzzz' "
"Is there a more efficient / general implementation?"
| w |
w := WriteStream on: String new.
aCollection do: [ :elem | w nextPutAll: elem asString] separatedBy: [w nextPutAll: self].
^String fromString: w contents
Suggestion for an adapted solution for Cuis at the level of class String (not #SequencableCollection)
join: aCollection
"'*' join: #('WWWWW' 'W EW' 'zzzz')
-> 'WWWWW*W EW*zzzz' "
| w |
w := WriteStream on: String new.
aCollection do: [ :elem | w nextPutAll: elem asString] separatedBy: [w nextPutAll: self].
^w contents
Pharo
String
withCRs
"Return a copy of the receiver in which backslash (\) characters have been replaced with carriage returns."
^ self collect: [ :c | c = $\ ifTrue: [ Character cr ] ifFalse: [ c ]].
Pharo
Symbol
value: anObject
^anObject perform: self.
Add all the methods to Cuis
#testHexadecimalIntegers
fails here
self
assert:
(NeoNumberParser
parse: '-7b'
base: 16)
equals: -123.
Reason is Cuis-Smalltalk/Cuis-Smalltalk-Dev#51
Pharo 4.0 has
Object
assert: aBlock description: aStringOrBlock
"Throw an assertion error if aBlock does not evaluates to true."
aBlock value
ifFalse: [ AssertionFailure signal: aStringOrBlock value ]
replace call to
#assert:description
with
#assert:
replace
codePoint
with
unicodeCodePoint
replace
String cr
with
String crString
replace
String crlf
with
String crlfString
replace
String lf
with
String lfString
do string replacements in the *.pck.st files
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.