Lines Matching defs:String
21 // Within the format string, an underscore _ represents a space that may be
48 // Text in the format string that is not recognized as part of the reference
53 // of the layout string in detail and is a good reference.
128 // startsWithLowerCase reports whether the string has a lower-case letter at the beginning.
130 func startsWithLowerCase(str string) bool {
138 // nextStdChunk finds the first occurrence of a std string in
139 // layout and returns the text before, the std string, and the text after.
140 func nextStdChunk(layout string) (prefix string, std int, suffix string) {
254 // String of digits must end here - only fractional second is all digits.
269 var longDayNames = []string{
279 var shortDayNames = []string{
289 var shortMonthNames = []string{
305 var longMonthNames = []string{
323 func match(s1, s2 string) bool {
339 func lookup(tab []string, val string) (int, string, error) {
382 func atoi(s string) (x int, err error) {
425 // String returns the time formatted using the format string
427 func (t Time) String() string {
440 // to the end of the seconds section of layout string, as in "15:04:05.000"
447 func (t Time) Format(layout string) string {
458 return string(b)
463 func (t Time) AppendFormat(b []byte, layout string) []byte {
505 b = append(b, month.String()[:3]...)
507 m := month.String()
514 b = append(b, absWeekday(abs).String()[:3]...)
516 s := absWeekday(abs).String()
620 // ParseError describes a problem parsing a time string.
622 Layout string
623 Value string
624 LayoutElem string
625 ValueElem string
626 Message string
629 func quote(s string) string {
633 // Error returns the string representation of a ParseError.
634 func (e *ParseError) Error() string {
647 func isDigit(s string, i int) bool {
657 // remainder of the string.
658 func getnum(s string, fixed bool) (int, string, error) {
671 func cutspace(s string) string {
680 func skip(value, prefix string) (string, error) {
699 // Parse parses a formatted string and returns the time value it represents.
705 // input string.
712 // of the layout string in detail and is a good reference.
742 func Parse(layout, value string) (Time, error) {
751 func ParseInLocation(layout, value string, loc *Location) (Time, error) {
755 func parse(layout, value string, defaultLocation, local *Location) (Time, error) {
772 zoneName string
791 var p string
906 var sign, hour, min, seconds string
1064 // parseTimeZone parses a time zone string and returns its length. Time zones
1067 // beginning of the string, so it's almost always true that there's one
1068 // there. We look at the beginning of the string for a run of upper-case letters.
1074 func parseTimeZone(value string) (length int, ok bool) {
1115 // parseGMT parses a GMT time zone. The input string is known to start "GMT".
1118 func parseGMT(value string) int {
1140 func parseNanoseconds(value string, nbytes int) (ns int, rangeErrString string, err error) {
1165 func leadingInt(s string) (x int64, rem string, err error) {
1188 func leadingFraction(s string) (x int64, scale float64, rem string) {
1216 var unitMap = map[string]int64{
1227 // ParseDuration parses a duration string.
1228 // A duration string is a possibly signed sequence of
1232 func ParseDuration(s string) (Duration, error) {